|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.common.MCRMailer
public class MCRMailer
This class provides methods to send emails from within a MyCoRe application.
| Field Summary | |
|---|---|
protected static String |
encoding
|
(package private) static Logger |
logger
Logger |
protected static javax.mail.Session |
mailSession
|
protected static int |
numTries
How often should MCRMailer try to send mail? |
| Constructor Summary | |
|---|---|
MCRMailer()
|
|
| Method Summary | |
|---|---|
static void |
send(Element email)
Send email from a given XML document. |
static void |
send(String from,
List<String> replyTo,
List<String> to,
List<String> bcc,
String subject,
String body,
List<String> parts)
Sends email. |
static void |
send(String sender,
List<String> recipients,
String subject,
String body,
boolean bcc)
This method sends a simple plaintext email to more than one recipient. |
static void |
send(String sender,
List<String> recipients,
String subject,
String body,
List<String> parts,
boolean bcc)
This method sends a multipart email to more than one recipient. |
static void |
send(String sender,
String recipient,
String subject,
String body)
This method sends a simple plaintext email with the given parameters. |
static void |
send(String sender,
String recipient,
String subject,
String body,
List<String> parts)
This method sends a multipart email with the given parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static Logger logger
protected static javax.mail.Session mailSession
protected static String encoding
protected static int numTries
| Constructor Detail |
|---|
public MCRMailer()
| Method Detail |
|---|
public static void send(String sender,
String recipient,
String subject,
String body)
sender - the sender of the emailrecipient - the recipient of the emailsubject - the subject of the emailbody - the textbody of the email
public static void send(String sender,
List<String> recipients,
String subject,
String body,
boolean bcc)
sender - the sender of the emailrecipients - the recipients of the email as a List of Stringssubject - the subject of the emailbody - the textbody of the emailbcc - if true, sender will also get a copy as cc recipient
public static void send(String sender,
String recipient,
String subject,
String body,
List<String> parts)
sender - the sender of the emailrecipient - the recipient of the emailsubject - the subject of the emailparts - a List of URL strings which should be added as partsbody - the textbody of the email
public static void send(String sender,
List<String> recipients,
String subject,
String body,
List<String> parts,
boolean bcc)
sender - the sender of the emailrecipients - the recipients of the email as a List of Stringssubject - the subject of the emailbody - the textbody of the emailparts - a List of URL strings which should be added as partsbcc - if true, sender will also get a copy as bcc recipientpublic static void send(Element email)
email - the email as JDOM element.
public static void send(String from,
List<String> replyTo,
List<String> to,
List<String> bcc,
String subject,
String body,
List<String> parts)
from - the sender of the emailreplyTo - the reply-to addresses as a List of Strings, may be nullto - the recipients of the email as a List of Stringsbcc - the bcc recipients of the email as a List of Strings, may be
nullsubject - the subject of the emailbody - the text of the emailparts - a List of URL strings which should be added as parts, may be
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||