Am 19.05.2015 um 10:33 schrieb Sönke Ludwig:

On Mon, 18 May 2015 13:09:18 GMT, Suliman wrote:

Do you mean do something like this:

final switch (ver) {
case SSLVersion.tls1: method = SSLv23_client_method(); break; // fix here
case SSLVersion.ssl3: method = SSLv3_client_method(); break;
//case SSLVersion.tls1: method = TLSv1_client_method(); break;
case SSLVersion.dtls1: method = DTLSv1_client_method(); break;

and then recompile project? Maybe there any way to specify what I need in my app?

I just tried and actually TLS seems to be the issue (SSL 3 works fine). Changing the line around smtp.d:165 to:

auto ctx = createTLSContext(TLSContextKind.client, TLSVersion.ssl3)

Fixes the issue. Judging by some Google results, this seems to be a general interoperability issue with newer OpenSSL versions. See also:

It's kind of strange that such an error still exists (introduced in 1.0.1g and still in 1.0.1m) when it occurs with such a major e-mail provider. It seems like the only sensible fix I can provide is to add a tlsVersion field to SMTPClientSettings.

Okay, on Git master, adding the following lines to the example should
make it work:

 settings.tlsVersion = TLSVersion.ssl3;
 settings.tlsValidationMode = TLSPeerValidationMode.validCert;