SetAttachmentProperty method: IBInfo class
Syntax
SetAttachmentProperty(Content_ID, Property_Type, Value)
Description
Use the SetAttachmentProperty to specify the value and type of a property associated with an attachment.
Parameters
| Parameter | Description |
|---|---|
|
Content_ID |
Specify the content ID associated with the attachment. |
|
Property_Type |
Specify the type of property. See below for the valid values. |
|
Value |
Specify the value associated with this property. |
For the Property_Type parameter, the valid values are:
| Constant Value | Description |
|---|---|
|
%Attachment_Encoding |
Specify the encoding type. |
|
%Attachment_Type |
Specify the attachment type. |
|
%Attachment_URL |
Specifies the URL for the attachment. The URL must be an absolute URL. |
|
%Attachment_Base |
Specify the attachment base. |
|
%Attachment_Location |
Specify an additional location for the attachment. |
|
%Attachment_Disposition |
Specifies the disposition of the attachment, whether it's displayed inline or as an attachment. |
|
%Attachment_Description |
Specifies the description of the attachment. |
Returns
A Boolean value: true if the property is set successfully, false otherwise.
Example
The following example shows sending an attachment with an asynchronous message:
Local Message &MSG;
Local Rowset &FLIGHT_PROFILE;
Local String &Attachment_Id;
Local Boolean &Test;
Local IntBroker &IntBroker;
QE_FLIGHTDATA.QE_ACNUMBER.Value = QE_FLIGHTDATA.QE_ACNUMBER + 1;
&FLIGHT_PROFILE = GetLevel0();
&MSG = CreateMessage(Operation.ASYNC_RR);
&Attachment_Id = &MSG.IBInfo. AddAttachment("C:\\temp\\MyFile.txt");
&Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Encoding,⇒
"UTF-8");
&Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Base,⇒
"Standard");
&Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Disposition,⇒
"Pending");
&Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Language,⇒
"English");
&Test = &MSG.IBInfo.SetAttachmentProperty(&Attachment_Id, %Attachment_Description,⇒
"Parts data");
&MSG.CopyRowset(&FLIGHT_PROFILE);
&IntBroker = %IntBroker
&IntBroker.Publish(&MSG);
Related Topics