combit List & Label 25 - .NET Online Web Help
AdditionalOptions Property


combit.ListLabel25 Namespace > MailJob Class : AdditionalOptions Property

Allows to define some additional mail options e.g. for sending via SMTP.

These options can be found in the Programmer's Reference for "Export.Mail..." (see also chapter '7.5.2 Setting Mail Parameters by Code').

Syntax
'Declaration
 
Public ReadOnly Property AdditionalOptions As Dictionary(Of String,String)
public Dictionary<string,string> AdditionalOptions {get;}
public:
property Dictionary<String^,String^>^ AdditionalOptions {
   Dictionary<String^,String^>^ get();
}
Example

Shows sending mail via the SMTP protocol.

// Instantiate mail job
MailJob mailJob = new MailJob();

// Set options
mailJob.AttachmentList.Add(@"<Path>\report.pdf");
mailJob.To = "info@combit.net";
mailJob.Subject = "Here is the report";
mailJob.Body = "Please note the attachment.";
mailJob.ShowDialog = true;

// Set SMTP options
mailJob.Provider = "SMTP";
mailJob.AdditionalOptions.Add("Export.Mail.SMTP.ServerAddress", "<ServerAddress>);
mailJob.AdditionalOptions.Add("Export.Mail.SMTP.ServerUser", "<ServerUser>");
mailJob.AdditionalOptions.Add("Export.Mail.SMTP.ServerPassword", "<ServerPassword>");

// Send mail
mailJob.Send();
mailJob.Dispose();
' Instantiate mail job
Dim mailJob As New MailJob()

' Set options
mailJob.AttachmentList.Add("<Path>\report.pdf")
mailJob.To = "info@combit.net"
mailJob.Subject = "Here is the report"
mailJob.Body = "Please note the attachment."
mailJob.ShowDialog = True

' Set SMTP options
mailJob.Provider = "SMTP"
mailJob.AdditionalOptions.Add("Export.Mail.SMTP.ServerAddress", "<ServerAddress>)
mailJob.AdditionalOptions.Add("Export.Mail.SMTP.ServerUser", "<ServerUser>")
mailJob.AdditionalOptions.Add("Export.Mail.SMTP.ServerPassword", "<ServerPassword>")

' Send mail
mailJob.Send()
mailJob.Dispose()

One more sample for sending mail is shown here: Sending mail.

Requirements

Platforms: Windows 7 SP1 - Windows 10 Version 1909, Windows Server 2008 R2 - 2019

See Also

Reference

MailJob Class
MailJob Members