- INTERNAL METHODS
Protocol::SMTP::Client - abstract client support for mail sending
Provides a client implementation for interacting with SMTP servers.
Instantiates an SMTP client instance.
Takes no parameters.
Set this on instantiation to pick a specific auth method.
Attempts to log in to the server. Takes the following named parameters:
user - the username we're logging in with, might be your email address or a plain username
pass - used for password-based auth mechanisms such as PLAIN or MD5
Note that other auth mechanisms may provide additional fields - this will mostly be determined by how Authen::SASL deals with the authentication process.
Returns a Future which resolves once login completes or fails.
Attempts to send the given email.
Expects the following named parameters:
to - single email address or arrayref of recipients
from - envelope sender
data - the email content itself, currently needs to be 8BITMIME encoded, please raise an RT if other formats are required.
content - the email as a Perl Unicode string, this is mutually exclusive with the data parameter
Returns a Future which will resolve when the send is complete.
The following are used internally. They are not likely to be of much use to client code, but may need to be called by implementations. See Net::Async::SMTP for a reference.
Used internally for debugging, returns an empty list.
Uses the configured writer to send data to the remote.
Returns true if we're partway through processing something.
Frames a line appropriately for sending to a remote.
Body encoding, currently hardcoded as 8BITMIME.
Sequence of writes to send email to the remote. Normally you wouldn't use this directly, it'd be queued as a task by "send".
Called internally to check whether we have any other tasks we could be doing.
Returns true if we have the given feature.
Marks the given feature from EHLO response as supported.
Also applies AUTH values.
Internal accessor, returns the list of defined authentication methods.
Sends the EHLO greeting and handles the resulting feature list.
Switch to TLS mode.
Get initial startup banner.
Waits for the given status code.
If we get something else, will mark as a failure.
Handle input line from remote.
Add another task to the queue.
Tom Molesworth <email@example.com>
Copyright Tom Molesworth 2012-2014. Licensed under the same terms as Perl itself.