SetMailAttribute()

Syntax

SetMailAttribute(#Mail, Attribute, Value$)
Description
Change the specified #Mail attribute with the new 'Value$'. 'Attribute' may be one of the following values:
  #PB_Mail_From   : Change the 'From' attribute, set with CreateMail().
  #PB_Mail_Subject: Change the 'Subject' attribute, set with CreateMail().
  #PB_Mail_XMailer: Change the 'X-Mailer' attribute (not sent by default).
  #PB_Mail_Date   : Change the 'Date' attribute (default is the computer date).
  #PB_Mail_Custom : Add customs fields (can be multi-line).

Example:

  InitNetwork()

  If CreateMail(0, "test@purebasic.com", "Hello")
    SetMailAttribute(0, #PB_Mail_XMailer, "PureMailer")
    Debug GetMailAttribute(0, #PB_Mail_XMailer) ; Will print "PureMailer"
  EndIf

Supported OS

All

<- SendMail() - Mail Index - SetMailBody() ->