Sending E-Mails with MQL.Mail

 

Hi everybody,

do you like to send e-mails

  • to multiple recipients with one mail (including support for TO, CC, BCC)
  • with multiple attachments
  • as plain text or as HTML styled text?

Then the 3rd party library MQL.Mail by MMM might be interesting for you:

It is as easy as this:

#import "StEn.MMM.Mql.Mail.dll"

MailModule::Initialize("smtp.strato.de", 587, "account@mmm.steven-england.info", "yourpassword", 10);
string recipients[] = {"to:recipient1 <r1@sten.info>", "to:r2@sten.info", "cc:r3@sten.info", "bcc:r4@sten.info"};
// without attachment
string resultOfSendMail = MailModule::SendMail("StEn <test@sten.info>", recipients, "test subject", "plain text body", "<b>html</b> body");
// with attachment
string attachments[1];
attachments[0] = TerminalInfoString(TERMINAL_DATA_PATH) + "\\MQL5\\Libraries\\"+"photo.png";
resultOfSendMail = MailModule::SendMail("StEn <test@sten.info>", recipients, "test subject", "plain text body", "<b>html</b> body", attachments);

stevenengland/MMM
stevenengland/MMM
  • stevenengland
  • github.com
Do you miss anything? A new module or a functionality for an existing module? -> contact me Module Overview The aim of this project is to provide popular messaging services for Metatrader. Module Description Build Overview Module Branch Status Getting started To get started have a look at the following sources: These instructions will...