AddImportedAttachment method: MCFEmail class
Syntax
AddImportedAttachment(&emailID, &emailPartID)
Description
Use the AddImportedAttachment method to add a new attachment email part to an email, from an existing email attachment that has already been imported into the system. The attachment is identified by the email ID and email part ID passed into the method.
Parameters
| Parameter | Description |
|---|---|
|
&emailID |
Specify the email ID to identify the attachment to be added to an email. This parameter takes an integer value. |
|
&emailPartID |
Specify the email part ID to identify the attachment to be added to an email. This parameter takes an integer value. |
Returns
None.
Example
Local PT_MCF_MAIL:MCFOutboundEmail &email = create PT_MCF_MAIL:MCFOutboundEmail();
&email.From = &From;
&email.Recipients = &Recipients;
&email.Subject = &Subject;
Local PT_MCF_MAIL:MCFBodyPart &text = create PT_MCF_MAIL:MCFBodyPart();
&text.Text = "Hello";
Local PT_MCF_MAIL:MCFMultipart &mp = create PT_MCF_MAIL:MCFMultipart();
&mp.AddBodyPart(&text);
&email.MultiPart = ∓
&email.AddImportedAttachment(&emailID, &emailPartNum);
&res = &email.Send();