public class Mailer extends Object
| Constructor and Description |
|---|
Mailer() |
| Modifier and Type | Method and Description |
|---|---|
static javax.mail.Session |
getMailSession() |
static void |
sendMail(String fromName,
String fromEmail,
String email,
String subject,
String mailContent) |
static void |
sendMail(String fromName,
String fromEmail,
String email,
String subject,
String mailContent,
File attachment,
String filename)
Sends a mail with an attachment enclosed
|
public static void sendMail(String fromName, String fromEmail, String email, String subject, String mailContent) throws Exception
Exceptionpublic static void sendMail(String fromName, String fromEmail, String email, String subject, String mailContent, File attachment, String filename) throws Exception
fromName - The name which should be display as the sender.fromEmail - The replyaddressemail - To which address the mail should be sentsubject - Subject of the mailmailContent - The content of the messageattachment - The attachment to be sentfilename - Give that attachment a naem.Exception - if anyCopyright © 2017. All rights reserved.