ATTACHMENTS, CONTENT_TYPE, EMAIL_BODY, EMAIL_SUBJECT, FILE_SERVER, ISO_8859_1, KOI8_R, MAIL_DEBUG, MAIL_HOST, MAIL_PORT, MAIL_SMTP_AUTH, MAIL_SMTP_CONNECTIONTIMEOUT, MAIL_SMTP_FROM, MAIL_SMTP_PASSWORD, MAIL_SMTP_SOCKET_FACTORY_CLASS, MAIL_SMTP_SOCKET_FACTORY_FALLBACK, MAIL_SMTP_SOCKET_FACTORY_PORT, MAIL_SMTP_TIMEOUT, MAIL_SMTP_USER, MAIL_TRANSPORT_PROTOCOL, MAIL_TRANSPORT_TLS, RECEIVER_EMAIL, RECEIVER_NAME, SENDER_EMAIL, SENDER_NAME, SMTP, TEXT_HTML, TEXT_PLAIN, US_ASCII
构造器和说明 |
---|
MultiPartEmail() |
限定符和类型 | 方法和说明 |
---|---|
Email |
addPart(javax.mail.internet.MimeMultipart multipart)
Add a new part to the email.
|
Email |
addPart(javax.mail.internet.MimeMultipart multipart,
int index)
Add a new part to the email.
|
Email |
addPart(java.lang.String partContent,
java.lang.String partContentType)
Add a new part to the email.
|
MultiPartEmail |
attach(javax.activation.DataSource ds,
java.lang.String name,
java.lang.String description)
Attach a file specified as a DataSource interface.
|
MultiPartEmail |
attach(javax.activation.DataSource ds,
java.lang.String name,
java.lang.String description,
java.lang.String disposition)
Attach a file specified as a DataSource interface.
|
MultiPartEmail |
attach(EmailAttachment attachment)
Attach an EmailAttachment.
|
MultiPartEmail |
attach(java.net.URL url,
java.lang.String name,
java.lang.String description)
Attach a file located by its URL.
|
MultiPartEmail |
attach(java.net.URL url,
java.lang.String name,
java.lang.String description,
java.lang.String disposition)
Attach a file located by its URL.
|
void |
buildMimeMessage()
Builds the actual MimeMessage
|
java.lang.String |
getSubType()
Get the MIME subtype of the email.
|
boolean |
isBoolHasAttachments()
Checks whether there are attachments.
|
void |
setBoolHasAttachments(boolean b)
Sets whether there are attachments.
|
Email |
setMsg(java.lang.String msg)
Set the message of the email.
|
void |
setSubType(java.lang.String aSubType)
Set the MIME subtype of the email.
|
addBcc, addBcc, addBcc, addCc, addCc, addCc, addHeader, addReplyTo, addReplyTo, addReplyTo, addTo, addTo, addTo, getBccAddresses, getCcAddresses, getFromAddress, getHostName, getMailSession, getMimeMessage, getReplyToAddresses, getSentDate, getSmtpPort, getSocketConnectionTimeout, getSocketTimeout, getSslSmtpPort, getSubject, getToAddresses, isSSL, isTLS, resetToAddress, send, sendMimeMessage, setAuthentication, setAuthenticator, setBcc, setBounceAddress, setCc, setCharset, setContent, setContent, setDebug, setFrom, setFrom, setFrom, setHeaders, setHostName, setMailSession, setMailSessionFromJNDI, setPopBeforeSmtp, setReplyTo, setSentDate, setSmtpPort, setSocketConnectionTimeout, setSocketTimeout, setSSL, setSslSmtpPort, setSubject, setTLS, setTo, updateContentType
public void setSubType(java.lang.String aSubType)
aSubType
- MIME subtype of the emailpublic java.lang.String getSubType()
public Email addPart(java.lang.String partContent, java.lang.String partContentType) throws EmailException
partContent
- The content.partContentType
- The content type.EmailException
- see javax.mail.internet.MimeBodyPart
for definitionspublic Email addPart(javax.mail.internet.MimeMultipart multipart) throws EmailException
multipart
- The MimeMultipart.EmailException
- see javax.mail.internet.MimeBodyPart
for definitionspublic Email addPart(javax.mail.internet.MimeMultipart multipart, int index) throws EmailException
multipart
- The part to add.index
- The index to add at.EmailException
- An error occured while adding the part.public Email setMsg(java.lang.String msg) throws EmailException
setMsg
在类中 Email
msg
- A String.EmailException
- see javax.mail.internet.MimeBodyPart
for definitionspublic void buildMimeMessage() throws EmailException
buildMimeMessage
在类中 Email
EmailException
- see javax.mail.internet.MimeBodyPart
for definitionspublic MultiPartEmail attach(EmailAttachment attachment) throws EmailException
attachment
- An EmailAttachment.EmailException
- see javax.mail.internet.MimeBodyPart
for definitionspublic MultiPartEmail attach(java.net.URL url, java.lang.String name, java.lang.String description) throws EmailException
url
- The URL of the file (may be any valid URL).name
- The name field for the attachment.description
- A description for the attachment.EmailException
- see javax.mail.internet.MimeBodyPart
for definitionspublic MultiPartEmail attach(java.net.URL url, java.lang.String name, java.lang.String description, java.lang.String disposition) throws EmailException
url
- The URL of the file (may be any valid URL).name
- The name field for the attachment.description
- A description for the attachment.disposition
- Either mixed or inline.EmailException
- see javax.mail.internet.MimeBodyPart
for definitionspublic MultiPartEmail attach(javax.activation.DataSource ds, java.lang.String name, java.lang.String description) throws EmailException
ds
- A DataSource interface for the file.name
- The name field for the attachment.description
- A description for the attachment.EmailException
- see javax.mail.internet.MimeBodyPart
for definitionspublic MultiPartEmail attach(javax.activation.DataSource ds, java.lang.String name, java.lang.String description, java.lang.String disposition) throws EmailException
ds
- A DataSource interface for the file.name
- The name field for the attachment.description
- A description for the attachment.disposition
- Either mixed or inline.EmailException
- see javax.mail.internet.MimeBodyPart
for definitionspublic boolean isBoolHasAttachments()
public void setBoolHasAttachments(boolean b)
b
- the attachments flag