PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Progress Bar
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Sends an email using SMTP: the email is directly sent to the server. The email is actually sent when disconnecting from the SMTP server (i.e. when the session is closed).
Caution: Before sending the email, you must:
Example
Reports and Queries Sending a message by SMTP
// Ouverture d'une session SMTP
MaSession est un emailSessionSMTP
MaSession.AdresseServeur = "smtp.masociete.fr"
MaSession.OuvreSession()
 
// Construction d'un email
MonMessage est un Email
MonMessage.Expediteur = "service_commande@masociete.fr"
MonMessage.Destinataire.Ajoute("client@societe.com")
MonMessage.Sujet = SAI_SujetEmail
MonMessage.Message = SAI_TexteEmail
 
// Envoi du message
MaSession.EnvoieMessage(MonMessage)
Syntax

Sending an email using SMTP Hide the details

<Result> = <Session>.SendMessage([<Email> [, <Advanced options>]])
<Result>: Boolean
  • True if the message was sent to the SMTP server,
  • False otherwise. To get the details of the error, use ErrorInfo with the errMessage constant.
<Session>: Control name
Identifies the user session. Corresponds to:
<Email>: Optional Email variable
Versions 15 and later
Name of the Variable of type Email corresponding to the Email to be sent. If this parameter is not specified, the information found in the Email structure is used.
New in version 15
Name of the Variable of type Email corresponding to the Email to be sent. If this parameter is not specified, the information found in the Email structure is used.
Name of the Variable of type Email corresponding to the Email to be sent. If this parameter is not specified, the information found in the Email structure is used.
<Advanced options>: Optional Integer constant
Combination of following constants:
Versions 15 and later
emailOptionEncodeHeader
New in version 15
emailOptionEncodeHeader
emailOptionEncodeHeader
Encodes the message headers in Quoted-Printable if necessary.
The headers of messages are not encoded by default. This constant prevents the reception of email with wrongly decoded accented characters.
emailOptionMessageIDTakes the Email.MessageID variable into account to generate the email. This option is ignored if this variable is not specified.
This option is an advanced option.
emailOptionReferenceTakes the Email.Reference variable into account to generate the email. This option is ignored if this variable is not specified.
This option is an advanced option.
Remarks
Reports and Queries

Progress Bar

To follow the sending progress, use EmailProgressBar.
Component: wd270com.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment