Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,14 @@ private static void SendEHelloCallback(IAsyncResult result)

private bool SendHello()
{
if (_connection._enableSsl)
{
// We only try HELO command if EHLO was not recognized. Server cannot
// advertise STARTTLS in older HELO command, thus if TLS is required,
// we can fail early.
throw new SmtpException(SR.MailServerDoesNotSupportStartTls);
}

IAsyncResult result = HelloCommand.BeginSend(_connection, _connection._client!._clientDomain, s_sendHelloCallback, this);
//if ehello isn't supported, assume basic auth
if (result.CompletedSynchronously)
Expand Down
Loading