|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.util.mail.Emailer
public class Emailer
Helper class for sending emails. All mails sent by this class will have a footer that includes a link to this OLAT installation Initial Date: Feb 10, 2005
| Constructor Summary | |
|---|---|
Emailer(Identity mailFromIdentity,
boolean tryInstitutionalEmail)
Constructs an Emailer which derives its mail from address from the given Identity. |
|
Emailer(java.util.Locale locale)
Constructs an Emailer which derives its mail from address from the mailfrom configuration in OLATContext. |
|
| Method Summary | |
|---|---|
boolean |
sendEmail(java.util.List listOfContactLists,
java.lang.String subject,
java.lang.String body)
Creates a e-mail message with the given subject and body. |
boolean |
sendEmail(java.lang.String mailto,
java.lang.String subject,
java.lang.String body)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Emailer(java.util.Locale locale)
OLATContext
locale - locale that should be used for message localization
public Emailer(Identity mailFromIdentity,
boolean tryInstitutionalEmail)
Identity. The mail host used to send the
email is taken from the OLATContext
The boolean parameter determines which email address is
used.
mailFromIdentity - not null , containing the senders e-mailtryInstitutionalEmail - specifies email address priority order| Method Detail |
|---|
public boolean sendEmail(java.util.List listOfContactLists,
java.lang.String subject,
java.lang.String body)
throws javax.mail.internet.AddressException,
javax.mail.MessagingException
listOfContactLists - subject - body -
javax.mail.MessagingException
javax.mail.internet.AddressException
javax.mail.MessagingException
public boolean sendEmail(java.lang.String mailto,
java.lang.String subject,
java.lang.String body)
throws javax.mail.internet.AddressException,
javax.mail.SendFailedException,
javax.mail.MessagingException
mailto - subject - body -
javax.mail.internet.AddressException
javax.mail.SendFailedException
javax.mail.MessagingException - TODO:gs handle exceptions internally and may return some error codes or so to get rid of dependecy of mail/activatoin jars in olat
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||