class Draft extends Mail
| Modifier and Type | Field and Description |
|---|---|
static String | HDR_BCCHDR_BCC. |
cc, contentType, date, dateOnly, dateString, error, formattedDate, HEADER_MATCH, localFormattedDate, markForDeletion, messageID, quotedDate, reply, sender, shortSender, shortSubject, subject, to, uidl| Modifier and Type | Method and Description |
|---|---|
int | addAttachment(Attachment a)Adds an attachment if not already present. |
void | clearAttachments()Removes all attachments and deletes their data files. |
StringBuilder | encodeAttachments()Encodes all attachments as header lines for storage. |
List<Attachment> | getAttachments() |
String[] | getBcc() |
long | getSize()Includes size of attachments |
boolean | hasAttachment()Whether the content type suggests an attachment. |
void | removeAttachment(int index)Removes an attachment by index and deletes its data file. |
void | setBody(Buffer rb)Overridden to process attachment and Bcc headers |
void | setSize(long size) |
appendRecipients, appendRecipients, getAddress, getAttachmentType, getBody, getHeader, getPart, getRecipientsFromList, getRecipientsFromList, hasBody, hasHeader, hasPart, isNew, isSpam, setHeader, setNew, validateAddresspublic static final String HDR_BCC
public Draft(String uidl)
uidl - unique ID for this draftpublic int addAttachment(Attachment a)
a - the attachment to addpublic void clearAttachments()
public StringBuilder encodeAttachments()
public List<Attachment> getAttachments()
public String[] getBcc()
public long getSize()
public boolean hasAttachment()
MailhasAttachment in class Mailpublic void removeAttachment(int index)
index - the indexpublic void setBody(Buffer rb)