internal IAsyncResult BeginSendMail(MailAddress sender, MailAddressCollection recipients,
string deliveryNotify, bool allowUnicode, AsyncCallback callback, object state)
{
if (sender == null)
{
throw new ArgumentNullException(nameof(sender));
}
if (recipients == null)
{
throw new ArgumentNullException(nameof(recipients));
}
SendMailAsyncResult result = new SendMailAsyncResult(_connection, sender, recipients,
allowUnicode, _connection.DSNEnabled ? deliveryNotify : null,
callback, state);
result.Send();
return result;
}