Alumna::SMTP
Inherits Alumna::Mailer < Reference < Object
SMTP mailer. One method: send. This is not a Redis-style holder.
Each send opens one new connection, runs one dialog, and closes it. There is no shared connection state, so concurrent sends are safe.
Success returns nil. A server refusal, a network error, a TLS error, or a timeout returns MailError. Config mistakes raise ArgumentError.
Do not log the password. MailError text has the username and the password removed.
Constants
Constructors
Reads SMTP_HOST, and the optional SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD, and SMTP_TLS (starttls, implicit, or none; not case sensitive). A variable that is set must not be empty.
port nil means the default port of the mode (587, 465, or 25).
tls_context checks the server certificate. The default uses the system
CAs. Pass another context for a private CA or a client certificate.