4D Internet Commands v14

SMTP_Subject

Home

 
4D Internet Commands v14
SMTP_Subject

SMTP_Subject 


 

SMTP_Subject ( smtp_ID ; subject {; deleteOption} ) -> Function result 
Parameter Type   Description
smtp_ID  Longint in Message reference
subject  Text in Subject of message
deleteOption  Integer in 0 = Replace (if subject not empty), 1 = Replace, 2 = Delete
Function result  Integer in Error Code

The SMTP_Subject command adds the subject of the message to the message referenced by smtp_ID. If a subject has already been added by a previous SMTP_Subject command, the new subject will override the previous subject.

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

subject is a text value concisely describing the topic covered in detail by the message body.

Notes:

  • By default, the "Subject" header of the message is encoded in UTF-8, which ensures that the characters sent will be interpreted correctly by almost all of the e-mail clients. If you want to use a specific character set, refer to the SMTP_SetPrefs and SMTP_Charset commands. 
  • 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 "Subject" header:

  • A value of zero will set the "Subject" field to the new value, overriding any prior settings (if you pass an empty string in subject, the prior header will be used).
  • A value of 1 will set the "Subject" field to the new value, overriding any prior settings (if you pass an empty string in subject, the header will be deleted).
  • A value of 2 will remove the "Subject" field 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.

 
PROPERTIES 

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

 
HISTORY 

New
Created: 4D Internet Commands 6.5
Modified: 4D Internet Commands v14

 
SEE ALSO 

SMTP_Charset
SMTP_New
SMTP_SetPrefs

 
ARTICLE USAGE

4D Internet Commands ( 4D Internet Commands v14 R2)
4D Internet Commands ( 4D Internet Commands v14)
4D Internet Commands ( 4D Internet Commands v14 R3)
4D Internet Commands ( 4D Internet Commands v14 R4)

Inherited from : SMTP_Subject ( 4D Internet Commands v11.4)