4D Internet Commands v16

SMTP_Sender

Home

 
4D Internet Commands v16
SMTP_Sender

SMTP_Sender 


 

SMTP_Sender ( smtp_ID ; msgSender {; deleteOption} ) -> Funktionsergebnis 
Parameter Typ   Beschreibung
smtp_ID  Lange Ganzzahl in Message reference
msgSender  Text in MailAddress (1 only)
deleteOption  Ganzzahl in 0 = Add, 1 = Replace, 2 = Delete
Funktionsergebnis  Ganzzahl in Error Code

The SMTP_Sender command adds the e-mail address of the person that sends the message. It is intended to be used when the sender is not the actual author of the message, or to indicate who among a group of authors actually sent the message. This field is not necessary if the contents of the "Sender" field would be redundant with the "From" field.

In cases where a computer program is the creator and sender of a mail message, the Sender header should reference the mail account of the real person responsible for administering the actions of the program and not the account managed by the computer program.

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

msgSender contains a single MailAddress to be listed in the Sender field of the message. Only one mail address may be specified for this header.

deleteOption is an integer value which specifies whether to add or delete the Sender header:

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

In this example, three executives compose a message on the subject of a company policy change which is then distributed by the secretary to everyone in the company. Any responses to this message would be directed back to each of the three people listed in the "From" header.

 $From:="prez@acme.com, vp@acme.com, cfo@acme.com"
 $Error:=SMTP_From($smtp_id;$From;0)
 $Error:=SMTP_Sender($smtp_id;"secretary@acme.com";0)
 $Error:=SMTP_Subject($smtp_id;"Company Policy Change";0)
 $Error:=SMTP_To($smtp_id;◊AllEmployee;0)



Siehe auch 

SMTP_New

 
EIGENSCHAFTEN 

Produkt: 4D Internet Commands
Thema: IC Send Mail
Nummer: 88985

 
GESCHICHTE 

Erstellt: 4D Internet Commands 6.5

 
ARTIKELVERWENDUNG

4D Internet Commands ( 4D Internet Commands v16)