MailInfo.java 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. package com.izouma.awesomeadmin.model;
  2. import com.fasterxml.jackson.annotation.JsonAutoDetect;
  3. import com.fasterxml.jackson.annotation.JsonInclude;
  4. import org.apache.commons.mail.EmailAttachment;
  5. import java.util.List;
  6. /**
  7. * depart_info 实体类
  8. * Thu Apr 26 10:56:37 CST 2018 Suo Chen Cheng
  9. */
  10. @JsonAutoDetect
  11. @JsonInclude(JsonInclude.Include.NON_NULL)
  12. public class MailInfo {
  13. // 收件人
  14. private List<String> toAddress = null;
  15. // 抄送人地址
  16. private List<String> ccAddress = null;
  17. // 密送人
  18. private List<String> bccAddress = null;
  19. // 附件信息
  20. private List<EmailAttachment> attachments = null;
  21. // 邮件主题
  22. private String subject;
  23. // 邮件的文本内容
  24. private String content;
  25. public List<String> getToAddress() {
  26. return toAddress;
  27. }
  28. public void addToAddress(String toAddress) {
  29. this.toAddress.add(toAddress);
  30. }
  31. public void addToAddress(List<String> toAddress) {
  32. this.toAddress.addAll(toAddress);
  33. }
  34. public void addCcAddress(List<String> ccAddress) {
  35. if (null != ccAddress && ccAddress.size() > 0)
  36. this.ccAddress.addAll(ccAddress);
  37. }
  38. public List<EmailAttachment> getAttachments() {
  39. return attachments;
  40. }
  41. public void setAttachments(List<EmailAttachment> attachments) {
  42. this.attachments = attachments;
  43. }
  44. public List<String> getBccAddress() {
  45. return bccAddress;
  46. }
  47. public void setBccAddress(List<String> bccAddress) {
  48. this.bccAddress = bccAddress;
  49. }
  50. public String getSubject() {
  51. return subject;
  52. }
  53. public void setSubject(String subject) {
  54. this.subject = subject;
  55. }
  56. public String getContent() {
  57. return content;
  58. }
  59. public void setContent(String content) {
  60. this.content = content;
  61. }
  62. public void setToAddress(List<String> toAddress) {
  63. this.toAddress = toAddress;
  64. }
  65. public List<String> getCcAddress() {
  66. return ccAddress;
  67. }
  68. public void setCcAddress(List<String> ccAddress) {
  69. this.ccAddress = ccAddress;
  70. }
  71. }