Package org.apache.commons.mail

Examples of org.apache.commons.mail.SimpleEmail.send()


        StringBuilder body = new StringBuilder();
        body.append(buildBody(stream, checkResult, backlog));
        email.setMsg(body.toString());
        email.addTo(emailAddress);

        email.send();
    }

    protected String buildSubject(Stream stream, AlertCondition.CheckResult checkResult, Configuration config, List<Message> backlog) {
        StringBuilder sb = new StringBuilder();
View Full Code Here


            } else {
                simpleEmail.setFrom(from.getEmailAddress(), from.getName());
            }
            simpleEmail.setSubject(emailObject.getSubject());
            simpleEmail.setMsg(emailObject.getMessage());
            simpleEmail.send();
        } catch (EmailException e) {
            throw new org.apache.isis.example.domainservice.email.EmailException(e.getMessage(), e);
        }
    }
}
View Full Code Here

    }
        email.setFrom(from, "Wookie Server");
        email.setSubject("Wookie API Key");
        email.setMsg(message);
        email.addTo(to);
        email.send();
  }

}
View Full Code Here

            if (options.getReplyToEmail() != null)
            {
                email.setReplyTo(Arrays.asList(new InternetAddress(options.getReplyToEmail())));
            }

            email.send();
        }
        catch (EmailException e)
        {
            log.error("Unable to send email", e);
            if (log.isDebugEnabled())
View Full Code Here

  public void send( ConnectionConfig conf, MailAddress mailAddress, MailContent mail ){   
      SimpleEmail email = new SimpleEmail();     
      fillConfig( email,conf,mailAddress,mail );
     
      try{
        email.send();
      }catch( org.apache.commons.mail.EmailException ee){
        throw new MailException( ee );
      }   
  }
 
View Full Code Here

    }
        email.setFrom(from, "Wookie Server");
        email.setSubject("Wookie API Key");
        email.setMsg(message);
        email.addTo(to);
        email.send();
  }

}
View Full Code Here

            email.setFrom("compartilhartrabalhos@gmail.com", "BSI");
            email.setSubject("Voce tem um novo RMP");
            email.setMsg(textoEmail);
            email.setSSL(true);
            email.setAuthentication("compartilhartrabalhos@gmail.com", "bsi2012102");
            email.send();
        }
        catch (EmailException e){
            System.out.println("Erro " + e);
        }  
    }
View Full Code Here

    }
        email.setFrom(from, "Wookie Server");
        email.setSubject("Wookie API Key");
        email.setMsg(message);
        email.addTo(to);
        email.send();
  }

}
View Full Code Here

        simpleEmail.setSubject("hello world!");
        simpleEmail.setMsg("This is a simple plain text email");
        simpleEmail.addTo("mikevegap@gmail.com", "mike");

        simpleEmail.send();
    }
}
View Full Code Here

      email.addTo(mailInfo.getToAddress(), mailInfo.getToName()); // 设定收件人
      email.setFrom(mailInfo.getFromAddress(), mailInfo.getFromName());
      email.setSubject(mailInfo.getSubject());
      email.setCharset(mailInfo.getCharset());// 设定内容的语言集
      email.setMsg(mailInfo.getContent());// 设定邮件内容
      email.send();// 发送邮件
      return true;
    } catch (Exception ex) {
      ex.printStackTrace();
    }
    return false;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.