mailer library
Classes
- Address
- Attachment
- Represents a single email attachment.
- FileAttachment
- Message
- This class represents an e-mail that can be sent to someone/some people.
- PersistentConnection
- SendReport
- StreamAttachment
- StringAttachment
Enums
Functions
-
checkCredentials(
SmtpServer smtpServer, {Duration? timeout}) → Future< void> - Convenience method for testing SmtpServer configuration.
-
parseMailboxes(
String addresses) → List< Address> -
Parse a comma-separated list of rfc5322 3.4 mailboxes to a
List<Address>
. Does not handle rfc5322 comments. -
send(
Message message, SmtpServer smtpServer, {Duration? timeout}) → Future< SendReport> -
Throws following exceptions:
SmtpClientAuthenticationException,
SmtpClientCommunicationException,
SocketException
SmtpMessageValidationException Please report other exceptions you encounter.
Exceptions / Errors
- MailerException
- SmtpClientAuthenticationException
- This exception is thrown when the server either doesn't accept the authentication type or the username password is incorrect.
- SmtpClientCommunicationException
- This exception is thrown when the server unexpectedly returns a response code which differs to our accepted response codes (usually 2xx).
- SmtpMessageValidationException
- SmtpNoGreetingException
- SmtpUnsecureException
-
This exception is thrown when no secure connection can be established
and
SmtpOptions.securedOnly
is true.