Package com.google.code.lightssh.common.mail

Examples of com.google.code.lightssh.common.mail.Address


  /**
   * 忘记用户名
   */
  public void forgotUsername(String title, String email ){
    ConnectionConfig config = getEmailConnectionConfig();
    Address to = new Address(email,title);
    Address from = new Address(config.getUsername(),config.getUsername());
    MailAddress mailAddress = new MailAddress( to,from );
   
    StringBuffer content = new StringBuffer();
    content.append("您在系统的登录帐号为:" + title);
   
View Full Code Here


  public void forgotPassword(String retrieveUrl, LoginAccount account ){
    if( account == null || StringUtils.isEmpty(account.getEmail()) )
      return ;
   
    ConnectionConfig config = getEmailConnectionConfig();
    Address to = new Address(account.getEmail(),account.getLoginName());
    Address from = new Address(config.getUsername(),config.getUsername());
    MailAddress mailAddress = new MailAddress( to,from );
   
    StringBuffer content = new StringBuffer();
    content.append("<html>");
    //content.append("<img src=\"http://www.gstatic.com/codesite/ph/images/defaultlogo.png\"></br>");
View Full Code Here

        throw new MailException("邮件发送人地址、邮件接收人地址为空!");
      }
     
      try{
        //mail from address
        Address from = mailAddress.getFrom();
        email.setFrom( from.getEmail(), from.getName() );
       
        //添加收件人
        if( mailAddress.getTo() == null || mailAddress.getTo().isEmpty() )
          throw new MailException("未设定邮件接收者!");
       
View Full Code Here

TOP

Related Classes of com.google.code.lightssh.common.mail.Address

Copyright © 2018 www.massapicom. 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.