public class Mail extends MailHeader
Mail m = new Mail(); m.sFrom = "john@lazyj.ro"; m.sTo = "itzic@lazyj.ro;strul@lazyj.ro"; m.sCC = "hans@lazyj.ro"; m.sBCC = "boss@lazyj.ro"; m.sSubject = "test message"; m.sBody = "some text here"; m.sHTMLBody = "the same text as html"; m.sAttachedFiles = "/some/file;/another/file"; Sendmail s = new Sendmail(m.sFrom); s.send(m);
Sendmail,
Utils.htmlToText(String)| Modifier and Type | Field and Description |
|---|---|
boolean |
bOnlyHTML
If this is an HTML-only email
|
boolean |
bOnlyPlain
If this is an plain-text-only email
|
java.lang.String |
charSet
Character set used to send the body, HTML body and everything else
|
java.util.List<Attachment> |
lAttachments
List of attachments that were decoded when the email was constructed
|
java.lang.String |
sAttachedFiles
List of files to be attached to this mail when it will be sent
|
java.lang.String |
sBody
Plain text body
|
java.lang.String |
sHTMLBody
HTML-formatted body
|
java.lang.String |
sWMLBody
WML-formatted body
|
bConfirmation, bEstimatedHasAttachments, bOld, bRequestRcpt, hmHeaders, iFolder, iMailID, iMailSize, iPriority, iStatus, mdDate, sBCC, sCC, sConfirmation, sContentType, sEncoding, sFrom, sMessageID, sNotification, sOrigMessageID, sReplyTo, sReturnPath, sShortFrom, sSubject, sTomHeaders, sBoundary, sCompleteHeader| Constructor and Description |
|---|
Mail()
Simple constructor, initializing the internal fields to nothing at all (as expected :) )
|
Mail(java.lang.String sHeader,
java.lang.String sBodyText)
This constructor is used by the mail section.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
boolean |
hasAttachments()
Find out if the mail has some attachments.
|
int |
hashCode() |
static java.lang.String |
stripBodyCodes(java.lang.String sOrig)
Formatting function used when you want to display an email.
|
addHeader, compareTo, toStringgetOriginalHeader, getValue, mainpublic java.util.List<Attachment> lAttachments
public java.lang.String sBody
public java.lang.String sHTMLBody
public java.lang.String sWMLBody
public java.lang.String sAttachedFiles
public boolean bOnlyHTML
public boolean bOnlyPlain
public java.lang.String charSet
public Mail()
public Mail(java.lang.String sHeader,
java.lang.String sBodyText)
sHeader - header part of the mailsBodyText - public boolean hasAttachments()
lAttachments.sAttachedFilespublic static java.lang.String stripBodyCodes(java.lang.String sOrig)
sOrig - text part of the mail as it is in the emailpublic boolean equals(java.lang.Object o)
equals in class MailHeaderpublic int hashCode()
hashCode in class MailHeader