logo

class

email::SmtpClient

sys::Obj
  email::SmtpClient

SmtpClient implements the client side of SMTP (Simple Mail Transport Protocol) as specified by RFC 2821.

See docLib for details. See docCookbook for coding examples.

Slots

authCramMd5

Void authCramMd5()

Authenticate using CRAM-MD5 mechanism.

Source

authLogin

Void authLogin()

Authenticate using LOGIN mechanism.

Source

authPlain

Void authPlain()

Authenticate using PLAIN mechanism.

Source

authenticate

Void authenticate()

Authenticate using the strongest mechanism which both the server and myself support.

Source

close

Void close()

Close the session to the SMTP server. Do nothing if session already closed.

Source

host

Str host

DNS hostname of server.

Source

isClosed

Bool isClosed()

Return true if there is no open session.

Source

log

Log log := Log.get("smtp")

Log for tracing

Source

open

Void open()

Open a session to the SMTP server. If username and password are configured, then SMTP authentication is attempted. Throw SmtpErr if there is a protocol error. Throw IOErr is there is a network problem.

Source

password

Str password

Password to use for authentication, or null to skip authentication.

Source

port

Int port := 25

TCP port number of server, defaults to 25.

Source

readExts

Void readExts(SmtpRes res)

Query the reply lines to figure out which extensions the server supports that we might use.

Source

send

Void send(Email email)

Send the email to the SMTP server. Throw SmtpErr if there is a protocol error. Throw IOErr if there is a networking problem. If the session is closed, then this call automatically opens the session and guarantees a close after it is complete.

Source

username

Str username

Username to use for authentication, or null to skip authentication.

Source