Package i2p.susi.webmail
Class Draft
java.lang.Object
i2p.susi.webmail.Mail
i2p.susi.webmail.Draft
class Draft extends Mail
Holds a draft message and reference to attachments, if any
Differences from Mail:
- Never multipart, body is always text/plain UTF-8
- Attachments are just headers containing name, type, encoding, and path to file
- Bcc is a header
- Since:
- 0.9.35
-
Field Summary
Fields inherited from class i2p.susi.webmail.Mail
cc, contentType, date, dateOnly, dateString, error, formattedDate, HEADER_MATCH, localFormattedDate, markForDeletion, messageID, quotedDate, reply, sender, shortSender, shortSubject, subject, to, uidl
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description int
addAttachment(Attachment a)
void
clearAttachments()
StringBuilder
encodeAttachments()
List<Attachment>
getAttachments()
String[]
getBcc()
boolean
hasAttachment()
void
removeAttachment(int index)
void
setBody(Buffer rb)
Overridden to process attachment and Bcc headersMethods inherited from class i2p.susi.webmail.Mail
appendRecipients, appendRecipients, getAddress, getBody, getHeader, getPart, getRecipientsFromList, getRecipientsFromList, getSize, hasBody, hasHeader, hasPart, isNew, isSpam, setHeader, setNew, setSize, validateAddress
-
Field Details
-
HDR_BCC
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
setBody
Overridden to process attachment and Bcc headers -
hasAttachment
public boolean hasAttachment()- Overrides:
hasAttachment
in classMail
-
getBcc
- Returns:
- may be null
-
getAttachments
- Returns:
- non-null, not a copy
-
addAttachment
-
removeAttachment
public void removeAttachment(int index) -
clearAttachments
public void clearAttachments() -
encodeAttachments
-