Package com.ehealthsystem.mail
Class SendEmail
java.lang.Object
com.ehealthsystem.mail.SendEmail
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic javax.mail.Message
prepareMessage
(javax.mail.Session session, String myAccount, String recipient, String subject, String textContent) static javax.mail.Message
prepareMessageWithAttachment
(javax.mail.Session session, String myAccount, String recipient, String subject, String textContent) static void
static void
validateEmail
(String recipient)
-
Constructor Details
-
SendEmail
public SendEmail()
-
-
Method Details
-
prepareMessage
public static javax.mail.Message prepareMessage(javax.mail.Session session, String myAccount, String recipient, String subject, String textContent) throws javax.mail.MessagingException, UnsupportedEncodingException - Throws:
javax.mail.MessagingException
UnsupportedEncodingException
-
sendMail
public static void sendMail(String recipient, String subject, String textContent, boolean attach) throws javax.mail.MessagingException, IOException, SQLException - Throws:
javax.mail.MessagingException
IOException
SQLException
-
validateEmail
public static void validateEmail(String recipient) throws javax.mail.MessagingException, IOException, SQLException - Throws:
javax.mail.MessagingException
IOException
SQLException
-
prepareMessageWithAttachment
public static javax.mail.Message prepareMessageWithAttachment(javax.mail.Session session, String myAccount, String recipient, String subject, String textContent) throws javax.mail.MessagingException, SQLException, IOException - Throws:
javax.mail.MessagingException
SQLException
IOException
-