Package com.saperion.ngc.util
Class ZKMailSender
- java.lang.Object
-
- com.saperion.ngc.util.ZKMailSender
-
public final class ZKMailSender extends java.lang.ObjectZKMailSender to send emails. Configure this class in the web.xml. Following parameters are required: SMTPServer, SMTPUser and SMTPPass. Optional parameters are: SMTPPort, SMTPuseSSL, SMTPdebug
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ZKMailSendergetInstance()Returns the instance of the mail sender object.voidsendAttachmentMessage(java.lang.String[] to, java.util.List<ZKMailAttachment> attachments, java.lang.String mailMessage, java.lang.String subject)Sends a mail with the given attachment to a mail receiver.voidsendAttachmentMessage(java.util.List<java.lang.String> to, java.util.List<ZKMailAttachment> attachments, java.lang.String mailMessage, java.lang.String subject)Sends a mail with the given attachment to a mail receiver.voidsendPlainMessage(java.lang.String[] to, java.lang.String mailMessage, java.lang.String subject)Sends a plain message to the given address.voidsendPlainMessage(java.util.List<java.lang.String> to, java.lang.String mailMessage, java.lang.String subject)Sends a plain message to the given address.
-
-
-
Method Detail
-
getInstance
public static ZKMailSender getInstance()
Returns the instance of the mail sender object.- Returns:
- Singleton instance
-
sendPlainMessage
public void sendPlainMessage(java.lang.String[] to, java.lang.String mailMessage, java.lang.String subject) throws javax.mail.MessagingExceptionSends a plain message to the given address.- Parameters:
to- To mail addressmailMessage- Mail messagesubject- Mail subject- Throws:
javax.mail.MessagingException- Mail exception
-
sendPlainMessage
public void sendPlainMessage(java.util.List<java.lang.String> to, java.lang.String mailMessage, java.lang.String subject) throws javax.mail.MessagingExceptionSends a plain message to the given address.- Parameters:
to- To mail addressmailMessage- Mail messagesubject- Mail subject- Throws:
javax.mail.MessagingException- Mail exception
-
sendAttachmentMessage
public void sendAttachmentMessage(java.util.List<java.lang.String> to, java.util.List<ZKMailAttachment> attachments, java.lang.String mailMessage, java.lang.String subject) throws javax.mail.MessagingExceptionSends a mail with the given attachment to a mail receiver.- Parameters:
to- To mail addressattachments- The attachments to be sent.mailMessage- Mail messagesubject- Mail subject- Throws:
javax.mail.MessagingException- Mail exception
-
sendAttachmentMessage
public void sendAttachmentMessage(java.lang.String[] to, java.util.List<ZKMailAttachment> attachments, java.lang.String mailMessage, java.lang.String subject) throws javax.mail.MessagingExceptionSends a mail with the given attachment to a mail receiver.- Parameters:
to- To mail addressattachments- The attachments to be sent.mailMessage- Mail messagesubject- Mail subject- Throws:
javax.mail.MessagingException- Mail exception
-
-