Package com.ehealthsystem.mail
Class SendEmail
java.lang.Object
com.ehealthsystem.mail.SendEmail
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javax.mail.MessageprepareMessage(javax.mail.Session session, String myAccount, String recipient, String subject, String textContent) static javax.mail.MessageprepareMessageWithAttachment(javax.mail.Session session, String myAccount, String recipient, String subject, String textContent) static voidstatic voidvalidateEmail(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.MessagingExceptionUnsupportedEncodingException
-
sendMail
public static void sendMail(String recipient, String subject, String textContent, boolean attach) throws javax.mail.MessagingException, IOException, SQLException - Throws:
javax.mail.MessagingExceptionIOExceptionSQLException
-
validateEmail
public static void validateEmail(String recipient) throws javax.mail.MessagingException, IOException, SQLException - Throws:
javax.mail.MessagingExceptionIOExceptionSQLException
-
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.MessagingExceptionSQLExceptionIOException
-