public class SmtpMailSender extends Object implements MailSender
Constructor and Description |
---|
SmtpMailSender(InetAddress hostAddr) |
SmtpMailSender(InetAddress hostAddr,
int port) |
SmtpMailSender(String host) |
SmtpMailSender(String host,
int port) |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] argv) |
void |
sendMail(String from,
String[] to,
String[] cc,
String[] bcc,
String subject,
String body)
cc and bcc may be null.
|
void |
sendMail(String from,
String[] to,
String[] cc,
String[] bcc,
String subject,
String body,
String enc)
cc and bcc may be null.
|
public SmtpMailSender(InetAddress hostAddr, int port)
public SmtpMailSender(InetAddress hostAddr)
public SmtpMailSender(String host, int port) throws UnknownHostException
UnknownHostException
public SmtpMailSender(String host) throws UnknownHostException
UnknownHostException
public void sendMail(String from, String[] to, String[] cc, String[] bcc, String subject, String body, String enc) throws IOException, ProtocolException, UnsupportedEncodingException
MailSender
sendMail
in interface MailSender
IOException
ProtocolException
UnsupportedEncodingException
public void sendMail(String from, String[] to, String[] cc, String[] bcc, String subject, String body) throws IOException, ProtocolException
MailSender
sendMail
in interface MailSender
IOException
ProtocolException
public static void main(String[] argv)
Copyright © 2018 com.mchange. All rights reserved.