SendMail()

Syntax

Result = SendMail(#Mail, Smtp$ [, Port [, Asynchronous]])
Description
Send the specified #Mail. 'Smtp$' is the address of the mail server which will be used to send the mail. 'Port' is an optional parameter used to specify the server port (default is 25). By default, the program flow is blocked until the mail is completely sent. If 'Asynchronous' is set to 1, then the mail is sent in the background and then MailProgress() may be used to provide additional information regarding the #Mail status. If the mail could not be sent, then 'Result' is 0.

Example:

  InitNetwork()

  ; Note: change the address and smtp to have a working example
  ;
  If CreateMail(0, "test@youraddress.com", "Hello")
    AddMailRecipient(0, "youraddess@youraddress.com", #PB_Mail_To)

    Debug SendMail(0, "smtp.yourfavoritesmtp.com")
  EndIf

Supported OS

All

<- RemoveMailRecipient() - Mail Index - SetMailAttribute() ->