| Modifier and Type | Field and Description |
|---|---|
(package private) String[] | ccaddresses only, enclosed by <> |
String | contentTypeContent-Type header value |
Date | dateThe parsed message date |
String | dateOnlyLong date-only format for mail list tooltips |
String | dateStringRaw date string from the Date header |
String | errorError message from parsing, or empty |
String | formattedDateFormatted date string in UTC |
(package private) static byte[] | HEADER_MATCHAlso used by MailPart
See MailPart for why we don't do \r\n\r\n |
String | localFormattedDateFormatted date string in local time zone |
boolean | markForDeletionWhether this message is flagged for deletion |
String | messageIDMessage-ID as received, not HTML escaped |
String | quotedDateQuoted date in local time zone, longer format |
String | replyAddress only, enclosed by <>. |
String | senderAs received, trimmed only, not HTML escaped |
String | shortSenderSender name or address truncated with … |
String | shortSubjectSubject truncated with …. |
String | subjectAs received, trimmed only, not HTML escaped. |
(package private) String[] | toMay be null. |
String | uidlUnique ID assigned by the POP3 server |
| Modifier and Type | Method and Description |
|---|---|
static void | appendRecipients(PrintWriter out,
String[] recipients,
String prefix)Adds all items from the array
to the builder, separated by commas
This is for display of a forwarded email. |
static void | appendRecipients(StringBuilder buf,
ArrayList<String> recipients,
String prefix)Adds all items from the list
to the builder, separated by tabs. |
static String | getAddress(String address)Returns the first email address portion, enclosed by <> |
String | getAttachmentType()Get the attachment type. |
Buffer | getBody()This contains the header also. |
Buffer | getHeader()This may or may not contain the body also. |
MailPart | getPart()The parsed message part. |
static boolean | getRecipientsFromList(ArrayList<String> recipients,
String[] ccs,
boolean ok)A little misnamed. |
static boolean | getRecipientsFromList(ArrayList<String> recipients,
String text,
boolean ok)A little misnamed. |
long | getSize() |
boolean | hasAttachment()Whether the content type suggests an attachment. |
boolean | hasBody()Whether the body has been loaded. |
boolean | hasHeader() |
boolean | hasPart()Whether the body has been parsed into a MailPart. |
boolean | isNew()Whether this message is new (unread). |
boolean | isSpam()Whether this message is identified as spam. |
void | setBody(Buffer rb) |
void | setHeader(Buffer rb) |
void | setNew(boolean isNew) |
void | setSize(long size) |
static boolean | validateAddress(String address) |
String[] cc
<>public String contentType
public Date date
public String dateOnly
public String dateString
public String error
public String formattedDate
static final byte[] HEADER_MATCH
public String localFormattedDate
public boolean markForDeletion
public String messageID
public String quotedDate
public String reply
<>.public String sender
public String shortSender
public String shortSubject
public String subject
String[] to
public final String uidl
public Mail(String uidl)
uidl - unique ID for this mailpublic static void appendRecipients(PrintWriter out, String[] recipients, String prefix)
prefix - prepended to the addresses, includes trailing ": "public static void appendRecipients(StringBuilder buf, ArrayList<String> recipients, String prefix)
buf - out paramprefix - prepended to the addressespublic static String getAddress(String address)
address - the addresspublic String getAttachmentType()
public Buffer getBody()
public Buffer getHeader()
public MailPart getPart()
public static boolean getRecipientsFromList(ArrayList<String> recipients, String[] ccs, boolean ok)
recipients - out paramccs - the Cc addressesok - will be returnedpublic static boolean getRecipientsFromList(ArrayList<String> recipients, String text, boolean ok)
text - comma-separatedrecipients - out paramok - will be returnedpublic long getSize()
public boolean hasAttachment()
public boolean hasBody()
public boolean hasHeader()
public boolean hasPart()
public boolean isNew()
public boolean isSpam()
public void setBody(Buffer rb)
rb - buffer containing body datapublic void setHeader(Buffer rb)
rb - buffer containing header datapublic void setNew(boolean isNew)
isNew - the new/unread flagpublic void setSize(long size)
size - the message sizepublic static boolean validateAddress(String address)
address - E-mail address to be validated