On Tuesday, 22 August 2017 at 12:52:24 UTC, Vino.B wrote:
Request your help on sending Mails, I am able to receive mails with empty body the line "smtp.message ="Example Message" doesn't seem to be working and also please let me know how do i send a file as a attachment in a email.

The message there needs to be the complete message, including headers. The SMTP struct is pretty low-level.

My email.d (plus its dependencies, characterencodings.d, dom.d, and htmltotext.d) has the code to form a full message. It isn't very documented though.

https://github.com/adamdruppe/arsd


auto message = new EmailMessage();
message.to ~= "some@email";
message.subject = "Subject"
message.setTextBody("hi");
message.send(RelayInfo("smtp://whatever", "user", "pass"));
  • SMTP Mail Vino.B via Digitalmars-d-learn
    • Re: SMTP Mail Adam D. Ruppe via Digitalmars-d-learn

Reply via email to