Package com.mchange.net
Class SmtpMailSender
java.lang.Object
com.mchange.net.SmtpMailSender
- All Implemented Interfaces:
MailSender
-
Constructor Summary
ConstructorDescriptionSmtpMailSender
(String host) SmtpMailSender
(String host, int port) SmtpMailSender
(InetAddress hostAddr) SmtpMailSender
(InetAddress hostAddr, int port) -
Method Summary
-
Constructor Details
-
SmtpMailSender
-
SmtpMailSender
-
SmtpMailSender
- Throws:
UnknownHostException
-
SmtpMailSender
- Throws:
UnknownHostException
-
-
Method Details
-
sendMail
public void sendMail(String from, String[] to, String[] cc, String[] bcc, String subject, String body, String enc) throws IOException, ProtocolException, UnsupportedEncodingException Description copied from interface:MailSender
cc and bcc may be null.- Specified by:
sendMail
in interfaceMailSender
- Throws:
IOException
ProtocolException
UnsupportedEncodingException
-
sendMail
public void sendMail(String from, String[] to, String[] cc, String[] bcc, String subject, String body) throws IOException, ProtocolException Description copied from interface:MailSender
cc and bcc may be null. Uses the default encoding...- Specified by:
sendMail
in interfaceMailSender
- Throws:
IOException
ProtocolException
-
main
-