Skip to content

Vibe.d sendmail using TLS/gmail doesn't work (priveleged instruction) #2821

@FruitfulApproach

Description

@FruitfulApproach

Error:
Unhandled exception at 0x00007FF61A50FD60 in abalien.exe: 0xC0000096: Privileged instruction.

Code:

import vibe.core.log;
import vibe.mail.smtp;

void main()
{
	auto settings = new SMTPClientSettings("smtp.gmail.com", 587);
	settings.connectionType = SMTPConnectionType.startTLS;
	settings.authType = SMTPAuthType.plain;
	settings.username = "enjoysmath";
	settings.password = "<my password removed from here>";

	auto mail = new Mail;
	mail.headers["From"] = "my enjoysmath email address";
	mail.headers["To"] = "another email address that I have at gmail";
	mail.headers["Subject"] = "Testmail";
	mail.bodyText = "Hello, World!";

	logInfo("Sending mail...");
	sendMail(settings, mail);
	logInfo("done.");
}

Tried:

What I've tried: running visuald (visual studio i.e.) as administrator - no effect.

Behavior:
The sendMail() line gets deep into the vibe.d library and fails with above mentioned error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions