|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.util.mail.MailerWithTemplate
public class MailerWithTemplate
Description:
Helper class for managing email templates
Initial Date: 21.11.2006
| Method Summary | |
|---|---|
static MailerWithTemplate |
getInstance()
|
java.lang.String[] |
previewSubjectAndBody(Identity recipientTO,
java.util.List<Identity> recipientsCC,
java.util.List<Identity> recipientsBCC,
MailTemplate template,
Identity sender)
creates the subject and body for a preview. |
MailerResult |
sendMail(Identity recipientTO,
java.util.List<Identity> recipientsCC,
java.util.List<Identity> recipientsBCC,
MailTemplate template,
Identity sender)
Send a mail to the given identity and the other recipients (CC and BCC) using the template. |
MailerResult |
sendMailAsSeparateMails(java.util.List<Identity> recipientsTO,
java.util.List<Identity> recipientsCC,
java.util.List<Identity> recipientsBCC,
MailTemplate template,
Identity sender)
Send a mail to the given identities (TO, CC and BCC) using the template. |
MailerResult |
sendMailUsingTemplateContext(Identity recipientTO,
java.util.List<Identity> recipientsCC,
java.util.List<Identity> recipientsBCC,
MailTemplate template,
Identity sender)
Send email and use the given template-context. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MailerWithTemplate getInstance()
public MailerResult sendMailUsingTemplateContext(Identity recipientTO,
java.util.List<Identity> recipientsCC,
java.util.List<Identity> recipientsBCC,
MailTemplate template,
Identity sender)
recipientTO - recipientsCC - recipientsBCC - template - sender -
public java.lang.String[] previewSubjectAndBody(Identity recipientTO,
java.util.List<Identity> recipientsCC,
java.util.List<Identity> recipientsBCC,
MailTemplate template,
Identity sender)
recipientTO - recipientsCC - recipientsBCC - template - sender -
public MailerResult sendMail(Identity recipientTO,
java.util.List<Identity> recipientsCC,
java.util.List<Identity> recipientsBCC,
MailTemplate template,
Identity sender)
The method uses sendMailAsSeparateMails to send the message. If you have multiple identities to which you need to send the same mail, use the sendMailAsSeparateMails message and not this one
recipientTO - Identity for TO. Must not be NULLrecipientsCC - Identities List for CC. Can be NULL.recipientsBCC - Identities List for BCC. Can be NULLtemplate - Mail template. Must not be NULLsender - The senders identity. Can be NULL. In case of NULL the
systems send mail configuraton is used
public MailerResult sendMailAsSeparateMails(java.util.List<Identity> recipientsTO,
java.util.List<Identity> recipientsCC,
java.util.List<Identity> recipientsBCC,
MailTemplate template,
Identity sender)
The template is parsed for every identity in the TO list. For each of those identities a separate mail is sent. Use this only if the mail content differ for each identity. Otherwhise use the sendMailAsOneMail method.
In this method the recipients will not know who else got the mail since the mail is addressed personally.
recipientsTO - Identities List for TO. Must not be NULL and contain at
least one identity.recipientsCC - Identities List for CC. Can be NULL.recipientsBCC - Identities List for BCC. Can be NULLtemplate - Mail template. Must not be NULLsender - The senders identity. Can be NULL. In case of NULL the
systems send mail configuraton is used
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||