AddMailRecipient()

Syntax

AddMailRecipient(#Mail, Address$, Flags)
Description
Add a recipient to the specified #Mail. 'Address$' must be in a valid address format or the mail will not be sent correctly. 'Flags' may be a combination the following values:
  #PB_Mail_To : Main(s) recipient(s) of the mail
  #PB_Mail_Cc : Recipient(s) which are in copy of the mail (and everybody see it)
  #PB_Mail_Bcc: Recipient(s) which are in copy of the mail (but nobody see it)

Example:

  InitNetwork()

  If CreateMail(0, "test@purebasic.com", "Hello")
    AddMailRecipient(0, "andre@purebasic.com", #PB_Mail_To) ; Andre is the main recipient
    AddMailRecipient(0, "fred@purebasic.com", #PB_Mail_Cc)  ; Fred is in copy
    AddMailRecipient(0, "timo@purebasic.com", #PB_Mail_Bcc) ; Timo is in copy as well, but Andre and Fred doesn't know it
  EndIf

Supported OS

All

<- AddMailAttachmentData() - Mail Index - CreateMail() ->