Posted Tue, 19 May 2015 10:14:23 GMT in reply to
Sönke Ludwig
Reply
I still can't get it work.
My app dub.json have section:
"dependencies": {
"vibe-d": "~>0.7.19",
}
also I downloaded last vibed version from git and put it to: \AppData\Roaming\dub\packages\vibe-d-0.7.23\source\vibe
than I added:
settings.authType = SMTPAuthType.login;
settings.tlsVersion = TLSVersion.ssl3;
to my App.
So it's become:
import std.stdio;
import vibe.core.log;
import vibe.mail.smtp;
void main()
{
auto gmail = "bubnenkoff@gmail.com>";
auto pass = "12312312";
setLogLevel(LogLevel.verbose4);
auto settings = new SMTPClientSettings("smtp.gmail.com", 587);
settings.connectionType = SMTPConnectionType.startTLS;
settings.authType = SMTPAuthType.login;
settings.tlsVersion = TLSVersion.ssl3;
settings.tlsValidationMode = TLSPeerValidationMode.validCert;
settings.username = gmail;
settings.password = pass;
auto mail = new Mail;
mail.headers["From"] = gmail;
mail.headers["Subject"] = "Testmail";
mail.bodyText = "Hello, World!";
mail.headers["From"] = "<bubnenkoff@gmail.com>";
mail.headers["To"] = "<bubnenkoff@gmail.com>";
logInfo("Sending mail...");
sendMail(settings, mail);
logInfo("done.");
}
and now I am getting error:
source\app.d(15): Error: undefined identifier TLSVersion
source\app.d(16): Error: undefined identifier TLSPeerValidationMode