SmtpMailProperties

public class SmtpMailProperties

A class wrapping the SMTP Properties.

Author:Joel Matsumoto

Constructors

SmtpMailProperties

public SmtpMailProperties()

Methods

getFrom

public String getFrom()

Get the from property.

Returns:String

getHost

public String getHost()

Return the host.

Returns:host

getPassword

public String getPassword()

Get the password

Returns:String

getPort

public int getPort()

Get the port number.

Returns:int

getProperties

public Properties getProperties()

Get the properties data structure.

Returns:Properties

getProperty

public String getProperty(String key)

Get the value of the key.

Parameters:
  • key
Returns:

String

getUsername

public String getUsername()

Get the default username

Returns:username

setFrom

public void setFrom(String from)

Set the from property. If no from is set, uses msg.getFrom() or InternetAddress.getLocalAddress().

Parameters:
  • from

setHost

public void setHost(String host)

Set the default host to connect to.

Parameters:
  • host

setPassword

public void setPassword(String pw)

Set the password for servers needing authentication

Parameters:
  • pw

setPort

public void setPort(int port)

Set the port number. Defaults to 25.

Parameters:
  • port

setProperty

public void setProperty(String key, String value)

Add the key/value pair to trhe property structure.

Parameters:
  • key
  • value

setUsername

public void setUsername(String user)

Set the default username to be used

Parameters:
  • user