|
|
|
|
|
EmailSend (Function) In french: EmailEnvoie Sends an email via the SMTP protocol while controlling the "buffer" of the email. This function is an advanced function used to entirely configure the email sent. This function must only be used to manage the specific emails not managed by EmailSendMessage. For more details, see Writing an email. Note The full description of an Email is given in the Internet standard reference documents: RFC822 and RFC2045 to RFC2049. These documents are available on Internet (use a search engine with the references of the documents).
Email.NbRecipient = 1
Email.Recipient = "support_test@pcsoft_test.fr"
Email.Sender = "client@societe.fr"
Email.Message = "Test Auto eMail"
IF EmailBuildSource() = False THEN
Error(ErrorInfo())
RETURN
END
IF fSaveText("C:\MesEmails\ContenuEmail.txt", Email.Source) = False THEN
Error(ErrorInfo())
ELSE
EmailSend("SessionSMTP", "C:\MesEmails\ContenuEmail.txt")
IF ErrorOccurred = True THEN
Error(ErrorInfo())
END
END
END
Syntax
<Result> = EmailSend(<Username> , <File name>)
<Result>: Boolean - True if the function was successfully run,
- False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Username>: Character string Identifies the user session. Corresponds to the username that was used to start the email session (EmailStartSession). <File name>: Character string Identifies the file containing the entire email formatted according to the parameters expected by the SMTP server. Remarks The email structure When sending the email, only the variables of the email structure required by the SMTP protocol are taken into account. The other variables are ignored.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|