Class MAPI
Provides functionality to open the default mail application with a preconfigured mail with attachments.
Implements
Namespace: Sartorius.SAF.MAPI
Assembly: Sartorius.SAF.dll
Syntax
[Export(typeof(IMAPI))]
[PartCreationPolicy(CreationPolicy.NonShared)]
public class MAPI : IMAPI
Methods
View SourceAddAttachment(string)
Adds an attachment from the specified file location.
Declaration
public void AddAttachment(string attachmentFileName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | attachmentFileName | The path to the attachment file. |
AddBccRecipient(string)
Adds the specified recipient to the BCC field
Declaration
public void AddBccRecipient(string bcc)
Parameters
| Type | Name | Description |
|---|---|---|
| string | bcc | The email address of the recipient. |
AddCcRecipient(string)
Adds the specified recipient to the CC field
Declaration
public void AddCcRecipient(string cc)
Parameters
| Type | Name | Description |
|---|---|---|
| string | cc | The email address of the recipient. |
AddRecipient(string)
Adds the specified recipient to the To field.
Declaration
public void AddRecipient(string to)
Parameters
| Type | Name | Description |
|---|---|---|
| string | to |
OpenMail(string, string)
Opens the default mail application with the given data.
Declaration
public void OpenMail(string subject, string body)
Parameters
| Type | Name | Description |
|---|---|---|
| string | subject | A subject value. |
| string | body | A body content. |