类 UMail

java.lang.Object
com.gdxsoft.easyweb.utils.UMail

public class UMail extends Object
  • 构造器详细资料

    • UMail

      public UMail()
  • 方法详细资料

    • getMailSession

      @Deprecated public static javax.mail.Session getMailSession()
      已过时。
      Get the default MailSession (UPath)
      返回:
      MailSession
    • getMimeMessage

      public static javax.mail.internet.MimeMessage getMimeMessage(String from, String to, String subject, String content) throws UnsupportedEncodingException, javax.mail.MessagingException
      Get a mime message
      参数:
      from - The mail from
      to - The mail to
      subject - The mail subject
      content - The mail content
      返回:
      message
      抛出:
      UnsupportedEncodingException
      javax.mail.MessagingException
    • getMimeMessage

      public static javax.mail.internet.MimeMessage getMimeMessage(String from, String fromName, String to, String toName, String subject, String content, String[] atts, String charset) throws javax.mail.MessagingException, UnsupportedEncodingException
      Get a mime message
      参数:
      from - The mail from
      fromName - The mail from name
      to - The mail to
      toName - The mail to name
      subject - The mail subject
      content - The mail content
      atts - The attachments
      charset - The mail character set
      返回:
      message
      抛出:
      javax.mail.MessagingException
      UnsupportedEncodingException
    • getMimeMessage

      public static javax.mail.internet.MimeMessage getMimeMessage(String from, String fromName, String[] tos, String[] toNames, String[] ccs, String[] ccNames, String[] bccs, String[] bccNames, String[] replyTos, String[] replyToNames, String sender, String senderName, String subject, String content, String[] atts, String charset) throws javax.mail.MessagingException, UnsupportedEncodingException
      Get a mime message
      参数:
      from - The mail from
      fromName - The mail from name
      tos - The mail tos
      toNames - The mail to names
      ccs - The mail ccs
      ccNames - The mail cc names
      bccs - The mail bccs
      bccNames - The mail bcc names
      replyTos - The mail replayTos
      replyToNames - The mail replayTo names
      sender - The mail sender
      senderName - The mail sender name
      subject - The mail subject
      content - The mail content
      atts - The mail attachments
      charset - The mail character set
      返回:
      message
      抛出:
      javax.mail.MessagingException
      UnsupportedEncodingException
    • createSendMail

      public static SendMail createSendMail(String from, String fromName, String[] tos, String[] toNames, String[] ccs, String[] ccNames, String[] bccs, String[] bccNames, String[] replyTos, String[] replyToNames, String sender, String senderName, String subject, String content, String[] atts, String charset)
      Create a SendMail
      参数:
      from - The mail from
      fromName - The mail from name
      tos - The mail tos
      toNames - The mail to names
      ccs - The mail ccs
      ccNames - The mail cc names
      bccs - The mail bccs
      bccNames - The mail bcc names
      replyTos - The mail replayTos
      replyToNames - The mail replayTo names
      sender - The mail sender
      senderName - The mail sender name
      subject - The mail subject
      content - The mail content
      atts - The mail attachments
      charset - The mail character set
      返回:
      SendMail
    • getEmailDomain

      public static String getEmailDomain(String email)
      Get the domain from the email
      参数:
      email - The email
      返回:
      The domain
    • sendHtmlMail

      public static String sendHtmlMail(String from, String fromName, String[] tos, String[] toNames, String[] ccs, String[] ccNames, String[] bccs, String[] bccNames, String[] replyTos, String[] replyToNames, String sender, String senderName, String subject, String content, String[] atts, String charset)
      Send a email
      参数:
      from - The mail from
      fromName - The mail from name
      tos - The mail tos
      toNames - The mail to names
      ccs - The mail ccs
      ccNames - The mail cc names
      bccs - The mail bccs
      bccNames - The mail bcc names
      replyTos - The mail replayTos
      replyToNames - The mail replayTo names
      sender - The mail sender
      senderName - The mail sender name
      subject - The mail subject
      content - The mail content
      atts - The mail attachments
      charset - The mail character set
      返回:
      result
    • sendHtmlMail

      public static String sendHtmlMail(String from, String fromName, String tos, String toNames, String replyTos, String replyToNames, String subject, String content, String[] atts, String charset)
      Send a email
      参数:
      from - The mail from
      fromName - The mail from name
      tos - The mail tos, separate with commas
      toNames - The mail to names, separate with commas
      replyTos - The mail replayTos, separate with commas
      replyToNames - The mail replayTo names separate with commas
      subject - The mail subject
      content - The mail content
      atts - The mail attachments
      返回:
      result
    • sendHtmlMail

      public static String sendHtmlMail(String from, String fromName, String tos, String toNames, String subject, String content, String[] atts, String charset)
      Send a email
      参数:
      from - The mail from
      fromName - The mail from name
      tos - The mail tos, separate with commas
      toNames - The mail to names, separate with commas
      subject - The mail subject
      content - The mail content
      atts - The mail attachments
      charset - The character set
      返回:
      是否成功
    • sendHtmlMail

      public static String sendHtmlMail(String from, String fromName, String tos, String toNames, String subject, String content)
      Send a email
      参数:
      from - The mail from
      fromName - The mail from name
      tos - The mail tos, separate with commas
      toNames - The mail to names, separate with commas
      subject - The mail subject
      content - The mail content
      返回:
      result
    • sendHtmlMail

      public static String sendHtmlMail(String from, String fromName, String tos, String toNames, String subject, String content, String[] atts)
      Send a email
      参数:
      from - The mail from
      fromName - The mail from name
      tos - The mail tos, separate with commas
      toNames - The mail to names, separate with commas
      subject - The mail subject
      content - The mail content
      atts - The mail attachments
      返回:
      result
    • sendHtmlMail

      public static String sendHtmlMail(String from, String tos, String subject, String content, String[] atts)
      Send a email
      参数:
      from - The mail from
      tos - The mail tos, separate with commas
      subject - The mail subject
      content - The mail content
      atts - The mail attachments
      返回:
      result
    • sendHtmlMail

      public static String sendHtmlMail(String from, String tos, String subject, String content)
      Send a email
      参数:
      from - The mail from
      tos - The mail tos, separate with commas
      subject - The mail subject
      content - The mail content
      返回:
      result
    • sendMail

      public static String sendMail(javax.mail.internet.MimeMessage message)
      Send a email
      参数:
      message - The email message
      返回:
      result