public class EmailSession extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
password |
protected int |
port |
protected Properties |
properties |
protected String |
protocol |
protected String |
server |
protected String |
username |
Constructor and Description |
---|
EmailSession(String server,
int port,
String username,
String password,
String protocol,
Properties properties)
Create a session
|
protected final String server
protected final int port
protected final String username
protected final String password
protected final String protocol
protected final Properties properties
public EmailSession(String server, int port, String username, String password, String protocol, Properties properties) throws javax.mail.MessagingException
javax.mail.MessagingException
public void checkConnection() throws javax.mail.MessagingException
javax.mail.MessagingException
public void send(List<String> to, String from, String subject, String body) throws javax.mail.MessagingException
javax.mail.MessagingException
public void close() throws javax.mail.MessagingException
javax.mail.MessagingException