|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.utils.EMailUtils
public final class EMailUtils
Utilities for sending an email.
Method Summary | |
---|---|
static void |
sendEmail(java.lang.String to,
java.lang.String from,
java.lang.String subject,
java.lang.String body)
Send an email, throwing exceptions on errors. |
static void |
sendEmail(java.lang.String to,
java.lang.String from,
java.lang.String subject,
java.lang.String body,
boolean forgive)
Send an email, possibly forgiving errors. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void sendEmail(java.lang.String to, java.lang.String from, java.lang.String subject, java.lang.String body)
to
- The recipient of the email. Separate multiple recipients with
commas.from
- The sender of the email.subject
- The subject of the email.body
- The body of the email.
ArgumentNotValid
- If either parameter is null, if to, from or
subject is the empty string, if to or from
does not contain valid email adresses.
IOFailure
- If the message cannot be sent for some reason.public static void sendEmail(java.lang.String to, java.lang.String from, java.lang.String subject, java.lang.String body, boolean forgive)
to
- The recipient of the email. Separate multiple recipients with
commas. Supports only adresses of the type 'john@doe.dk', not
'John Doe from
- The sender of the email.subject
- The subject of the email.body
- The body of the email.forgive
- On true, will send the email even on invalid email
addresses, if at least one recipient can be set, on false, will
throw exceptions on any invalid email address.
ArgumentNotValid
- If either parameter is null, if to, from or
subject is the empty string, or no recipient
can be set. If "forgive" is false, also on
any invalid to or from address.
IOFailure
- If the message cannot be sent for some reason.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |