| java.lang.Object de.schlund.pfixcore.util.email.EmailSender
EmailSender | public class EmailSender (Code) | | Utility class for sending mails via java mail-api.
author: Joerg Haecker |
Method Summary | |
public static void | sendMail(String subject, String text, String[] to, String from, String smtphost) Send an email (without headers). | public static void | sendMail(String subject, String text, String[] to, String from, String smtphost, String authuser, String authpassword) Send an email (without headers). | public static void | sendMail(String subject, String text, Map<String, String> headers, String[] to, String from, String smtphost) Send an email.
Parameters: subject - A String specifying the mail subject. | public static void | sendMail(String subject, String text, Map<String, String> headers, String[] to, String from, String smtphost, String authuser, String authpassword, boolean secure) Send an email.
Parameters: subject - A String specifying the mail subject. |
sendMail | public static void sendMail(String subject, String text, String[] to, String from, String smtphost) throws EmailSenderException(Code) | | Send an email (without headers).
Parameters: subject - A String specifying the mail subject. Not null. Parameters: text - The text the mail should contain. Not null. Parameters: to - A String arry specifying the recipients. Not null. Parameters: from - A String specifying the from address. Not null. Parameters: smtphost - A String specifying the smtp-server to use. Not null. throws: EmailSenderException - on errors when trying to send the mail. throws: IllegalArgumentExceptionwhen - trying to pass NPs as paramters. |
sendMail | public static void sendMail(String subject, String text, String[] to, String from, String smtphost, String authuser, String authpassword) throws EmailSenderException(Code) | | Send an email (without headers).
Parameters: subject - A String specifying the mail subject. Not null. Parameters: text - The text the mail should contain. Not null. Parameters: to - A String arry specifying the recipients. Not null. Parameters: from - A String specifying the from address. Not null. Parameters: smtphost - A String specifying the smtp-server to use. Not null. Parameters: authuser - username to use for authentication against the mail server.If set to null , no authentication will be used. Parameters: authpassword - password to use for authentication against the mail server.If set to null , no authentication will be used. throws: EmailSenderException - on errors when trying to send the mail. throws: IllegalArgumentExceptionwhen - trying to pass NPs as paramters. |
sendMail | public static void sendMail(String subject, String text, Map<String, String> headers, String[] to, String from, String smtphost) throws EmailSenderException(Code) | | Send an email.
Parameters: subject - A String specifying the mail subject. Not null. Parameters: text - The text the mail should contain. Not null. Parameters: headers - A Map contain strings as key and values, these headers will beappended to the headers of the email. Maybe null. Parameters: to - A String arry specifying the recipients. Not null. Parameters: from - A String specifying the from address. Not null. Parameters: smtphost - A String specifying the smtp-server to use. Not null. throws: EmailSenderException - on errors when trying to send the mail. throws: IllegalArgumentExceptionwhen - trying to pass NPs as paramters. |
sendMail | public static void sendMail(String subject, String text, Map<String, String> headers, String[] to, String from, String smtphost, String authuser, String authpassword, boolean secure) throws EmailSenderException(Code) | | Send an email.
Parameters: subject - A String specifying the mail subject. Not null. Parameters: text - The text the mail should contain. Not null. Parameters: headers - A Map contain strings as key and values, these headers will beappended to the headers of the email. Maybe null. Parameters: to - A String arry specifying the recipients. Not null. Parameters: from - A String specifying the from address. Not null. Parameters: smtphost - A String specifying the smtp-server to use. Not null. Parameters: authuser - username to use for authentication against the mail server.If set to null , no authentication will be used. Parameters: authpassword - password to use for authentication against the mail server.If set to null , no authentication will be used. Parameters: secure - flag indicating whether to use the STARTTLS command if the serversupports it. throws: EmailSenderException - on errors when trying to send the mail. throws: IllegalArgumentExceptionwhen - trying to pass NPs as paramters. |
|
|