4D Internet Commands v16

SMTP_Comments

Home

 
4D Internet Commands v16
SMTP_Comments

SMTP_Comments 


 

SMTP_Comments ( smtp_ID ; comments {; deleteOption} ) -> Function result 
Parameter Type   Description
smtp_ID  Longint in Message reference
comments  Text in Comment text
deleteOption  Integer in 0 = Replace (if comments not empty), 1 = Replace, 2 = Delete
Function result  Integer in Error Code

The SMTP_Comments command lets the user add text comments to the message while keeping the message's body untouched. The comments only appear within the header section of the message. Many mail readers do not display the full text of the message header to their users.

smtp_ID is the long integer reference to the mail message created with the SMTP_New command.

comments is a text value containing information you would like placed in the mail header.

Warning: The text should not contain a line feed (ascii=10). Doing so would signify the end of the header section and the beginning of the body. Subsequent header items could be pushed into the body and not recognized properly by the server or client software. For more information regarding the headers, please refer to RFC#822.

deleteOption is an integer value which specifies whether to replace or delete the "Comments" header:

  • A value of zero will set the "Comments" field to the new value, overriding any prior settings (if you pass an empty string in comments, the prior header will be kept).
  • A value of 1 will set the "Comments" field to the new value, overriding any prior settings (if you pass an empty string in comments, the header will be deleted).
  • A value of 2 will delete any comments previously defined for the "Comments" field and remove the header from the mail envelope.
    deleteOption is an optional parameter which will default to zero if not otherwise specified.

Example  

See the example for the command SMTP_Body.



See also 

SMTP_New

 
PROPERTIES 

Product: 4D Internet Commands
Theme: IC Send Mail
Number: 88978

 
HISTORY 

Created: 4D Internet Commands 6.5

 
ARTICLE USAGE

4D Internet Commands ( 4D Internet Commands v16)