类 MailDecode

java.lang.Object
com.gdxsoft.easyweb.utils.Mail.MailDecode

public class MailDecode extends Object
邮件解码
作者:
Administrator
  • 构造器详细资料

    • MailDecode

      public MailDecode(javax.mail.internet.MimeMessage mimeMessage, String attachmentSavePath)
      初始化对象
      参数:
      mimeMessage - 邮件
      attachmentSavePath - 附件保存目录
  • 方法详细资料

    • getAtts

      public List<Attachment> getAtts()
      获取所有附件,包括attachment和inline
      返回:
      the _Atts
    • getFrom

      public Addr getFrom() throws Exception
      获取发件人地址
      返回:
      地址
      抛出:
      Exception
    • getCc

      public List<Addr> getCc() throws Exception
      获取抄送列表
      返回:
      抄送列表
      抛出:
      Exception
    • getTo

      public List<Addr> getTo() throws Exception
      获取收件人列表
      返回:
      收件人列表
      抛出:
      Exception
    • getBcc

      public List<Addr> getBcc() throws Exception
      获取密送人列表
      返回:
      密送人列表
      抛出:
      Exception
    • getAllRecipients

      public List<Addr> getAllRecipients() throws Exception
      Get all recipients (to, cc, bcc)
      返回:
      The all recipients
      抛出:
      Exception
    • getMailAddress

      public List<Addr> getMailAddress(String type) throws Exception
      获得邮件的收件人,抄送,和密送的地址和姓名,
      根据所传递的参数的不同
      "to"
      "cc"
      "bcc"
      "all" -- All recipients
      返回:
      邮件地址列表
      抛出:
      Exception
    • getSubject

      public String getSubject() throws javax.mail.MessagingException
      获取邮件主题
      抛出:
      javax.mail.MessagingException
    • getSentDate

      public Date getSentDate() throws Exception
      获取邮件发送日期
      抛出:
      Exception
    • getReplySign

      public boolean getReplySign() throws javax.mail.MessagingException
      判断此邮件是否需要回执,如果需要回执返回"true",否则返回"false"
      返回:
      是否需要回执
      抛出:
      javax.mail.MessagingException
    • getMessageId

      public String getMessageId() throws javax.mail.MessagingException
      获得此邮件的Message-ID
      返回:
      Message-ID
      抛出:
      javax.mail.MessagingException
    • isNew

      public boolean isNew() throws javax.mail.MessagingException
      判断此邮件是否已读,如果未读返回返回false,反之返回true
      返回:
      此邮件是否已读
      抛出:
      javax.mail.MessagingException
    • isContainAttach

      public boolean isContainAttach(javax.mail.Part part) throws Exception
      判断此邮件是否包含附件
      参数:
      part - 邮件部分
      返回:
      是否包含附件
      抛出:
      Exception
    • saveAttachments

      public void saveAttachments() throws Exception
      保存所有附件
      抛出:
      Exception
    • getAttachPath

      public String getAttachPath()
      【获得附件存放路径】
      返回:
      附件存放路径
    • getBodyHtml

      public String getBodyHtml() throws Exception
      获取邮件正文 HTML
      返回:
      正文 HTML
      抛出:
      Exception
    • getBodyText

      public String getBodyText() throws Exception
      获取邮件正文 纯文本
      返回:
      正文 纯文本
      抛出:
      Exception