|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.silverpeas.mail.MailSending
public class MailSending
Handles easily the send of an email. It deals with centralized mechanism that ensures a synchronized use of mail services (SMTP server connexion for example).
| Method Summary | |
|---|---|
static MailSending |
from(MailAddress senderEmail)
Gets a new instance of MailSending by specifying the email of the sender. |
void |
send()
Performs the send of the mail. |
void |
sendSynchronously()
Performs the send of the mail synchronously. |
MailSending |
setReplyToRequired()
Indicates that the reply to field of the mail must be set. |
MailSending |
to(MailAddress receiverMailAddress)
Permits to specify the receiver of the mail. |
MailSending |
to(ReceiverMailAddressSet receiverMailAddressSet)
Permits to specify the receiver of the mail. |
MailSending |
withContent(MailContent content)
Permits to specify the content as MailContent of the mail. |
MailSending |
withContent(javax.mail.Multipart content)
Permits to specify the content as Multipart of the mail. |
MailSending |
withContent(String content)
Permits to specify the HTML content as String of the mail. |
MailSending |
withSubject(String subject)
Permits to specify the subject of the mail. |
MailSending |
withTextContent(String content)
Permits to specify the text content as String of the mail. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MailSending from(MailAddress senderEmail)
MailSending by specifying the email of the sender.
senderEmail - the email of the sender. This email can be changed just before the send
in case it is a not authorized one
(see MailUtil.getAuthorizedEmailAddress(String, String)).
MailSending.public MailSending to(MailAddress receiverMailAddress)
receiverMailAddress - the email of the receiver.
MailSending.public MailSending to(ReceiverMailAddressSet receiverMailAddressSet)
receiverMailAddressSet - the emails of the receivers.
MailSending.public MailSending withSubject(String subject)
subject - the subject.
MailSending.public MailSending withContent(String content)
content - the content as String.
MailSending.public MailSending withTextContent(String content)
<html> TAG, then it will be considered as an HTML
one, in all cases.
content - the content as String.
MailSending.public MailSending withContent(javax.mail.Multipart content)
Multipart of the mail.
content - the content as Multipart.
MailSending.public MailSending withContent(MailContent content)
MailContent of the mail.
content - the content as MailContent.
MailSending.public MailSending setReplyToRequired()
MailSending.public void send()
public void sendSynchronously()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||