Send mail

Component for sending mail messages using MS Exchange. This components works correctly only within the MS Exchange server container.

General properties of the element are described here. Specific ones are shown in the table below.

Please note that all properties except To are not mandatory. If only the recipient is specified, a blank email will be sent.

PropertyTypeDescription

To

String

Mail recipient. Mandatory field

Variable

Message data

Subject

String

Message subject

Message body

String

Body of the message

Attachments

List<String>

Path to email attachment files

Cc

String

Send a copy

Bcc

String

Send a Bcc (blind carbon copy)

From

String

Specified if the sender needs to be changed. Specify the email address alias, for example: "iv_ivan@mail.ru". Note that the email address should be on the list of addresses of the mail server (for more details, see this and this). If no value is specified, the default sender will be the owner of the account, with which connection to MS Exchange server is established.

Format

Message format

Copy to folder

Boolean

Make a copy of the message after sending

Copy folder

String

Folder name for saving message copy

Re: group

Reply

Reply to the message

Reply all

Boolean

If this flag is set, reply will be sent to all recipients

LTools.Office.MSExchangeApp app = LTools.Office.MSExchangeApp.InitSvc(wf, Microsoft.Exchange.WebServices.Data.ExchangeVersion.Exchange2013_SP1, "server url", "login", "pass", "domain");
LTools.Office.Model.OMailMessage msg = new LTools.Office.Model.OMailMessage() { Subject = "subject", Body = "body" };
app.SendMessage(msg);
app.SendMessage("body", "sendTo", "subject", new List<string>() { "file1" }, LTools.Office.Model.OMailMessage.MailFormats.HTML);

Last updated