company logo

Email - Sending and receiving emails

The class supports sending and receiving emails. Email messages have to be constructed from email properties as sender and receiver, subject and message (body). Before sending an email, message and all attachments have to be added to the email. Usually, also sender, receiver, host, and port have to be provided.

When cURL is not supported or when using port 25, emails are sent using POP before SMPT. When cURL is supported, encrypted emails can be sent using SSL including certificate verification for host and client.

// osi fragment

bool static sendMail () {


  Email         mail;

PROCESS; // explicit open required in OSI, only"");




  mail.subject("Test mail");

  mail.body("This is nothing else than a test");

  mail.html_body("<p>This is nothing else than a <b>test</b></p>");

  mail.attach("%TRACE%/error.lst"); // send odaba error protokol


  mail.close(); // release resources