- All Implemented Interfaces:
Serializable
邮件消息内容类
用于存储邮件的核心信息,包括主题、内容、附件等
- See Also:
-
-
Nested Class Summary
Nested Classes
-
-
Constructor Summary
Constructors
-
Method Summary
void
从JSON字符串反序列化为EmailContent对象
long
boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
-
-
textContent
邮件纯文本内容(不含HTML标签)
-
-
-
Constructor Details
-
EmailContent
public EmailContent()
-
Method Details
-
fromJson
从JSON字符串反序列化为EmailContent对象
- Parameters:
json
- JSON字符串
- Returns:
- EmailContent对象,如果解析失败返回null
-
addAttachment
添加附件
- Parameters:
attachment
- 附件对象
-
getAttachmentsTotalSize
public long getAttachmentsTotalSize()
获取附件总大小
- Returns:
- 附件总大小(字节)
-
hasAttachments
public boolean hasAttachments()
检查是否有附件
- Returns:
- 是否有附件