send function
Throws following exceptions:
SmtpClientAuthenticationException,
SmtpClientCommunicationException,
SocketException
SmtpMessageValidationException
Please report other exceptions you encounter.
Implementation
Future<SendReport> send(Message message, SmtpServer smtpServer,
{Duration? timeout}) async {
_validate(message);
var connection = await client.connect(smtpServer, timeout);
var sendReport = await _send(message, connection, timeout);
await client.close(connection);
return sendReport;
}