Cloud Mail 2020 C++ Builder Edition

Questions / Feedback?

SendMail Method

Sends a new email.

Syntax

void __fastcall SendMail(bool saveToSentItems);

Remarks

This method sends a new message. Use the Message* (excluding MessageInfo* properties and Message) to set the fields of the message that will be sent. To add an attachment, use the MessageAttachments* properties to add the attachment information. As a note, the relevant properties are not cleared after the method is called. It is recommend to do so after calling this method.

Example: Simple Email


office365.MessageSubject = "I saw a Tree";
office365.MessageImportance = "High";
office365.MessageBodyContentType = "TEXT";
office365.MessageBodyContent = "It was in my back yard initially. It was still there when I last checked.";
office365.MessageTo = "TreeLookOut@gmail.com";

office365.SendMail(True);
Example: HTML email with Attachments
office365.SetMessageSubject("Subject");
office365.SetMessageBodyContentType("HTML");
office365.SetMessageBodyContent("<p>Body</p><img src='cid:test1'>");
office365.SetMessageTo("email@example.com");
	
//Set up attachments
//Inline:
office365.SetMessageAttachmentCount(2);
office365.SetMessageAttachmentFile(0, "./test.png");
office365.SetMessageAttachmentName(0, "test picture");
office365.SetMessageAttachmentContentId(0, "test1");
office365.SetMessageAttachmentIsInline(0, true);

//Normal
office365.SetMessageAttachmentFile(1, "./test.txt");
office365.SetMessageAttachmentName(1, "test file");

office365.SendMail(true);

Copyright (c) 2022 /n software inc. - All rights reserved.
Cloud Mail 2020 C++ Builder Edition - Version 20.0 [Build 8308]