PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • The email structure
  • Asynchronous mode
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
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. See Writing an email for more details.
Note: The entire email description can be found in the reference documents of the Internet standard: RFC822 and RFC2045 to RFC2049. These documents are available on Internet (use a search engine with the references of the documents).
Versions 15 and later
You also have the ability to use the EmailSMTPSession and Email variables as well as EmailImportSource to send a message while controlling the source of the message.
New in version 15
You also have the ability to use the EmailSMTPSession and Email variables as well as EmailImportSource to send a message while controlling the source of the message.
You also have the ability to use the EmailSMTPSession and Email variables as well as EmailImportSource to send a message while controlling the source of the message.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 22 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
New in version 22
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
// Initialize the email structure
Email.NbRecipient = 1
Email.Recipient = "support_test@pcsoft_test.fr"
Email.Sender = "customer@company.fr"
Email.Message = "Auto Email Test"

// Build the message
IF EmailBuildSource() = False THEN
Error(ErrorInfo())
RETURN
END

IF fSaveText("c:\MyEmails\EmailContent.txt", Email.Source) = False THEN
Error(ErrorInfo())
ELSE
EmailSend("SMTPSession", "c:\MyEmails\EmailContent.txt")
IF ErrorOccurred = True THEN
Error(ErrorInfo())
END
END
END
Syntax
<Result> = EmailSend(<User Name> , <File Name>)
<Result>: Boolean
  • True if the function was successfully run,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<User Name>: Character string (with quotes)
Identifies the user session. Corresponds to the user name that was used to start the email session (EmailStartSession).
<File Name>: Character string (with quotes)
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.
Note: See The email structure for more details.
WEBDEV - Server codeAjax

Asynchronous mode

If the session was started in asynchronous mode (EmailStartSession and EmailStartSMTPSession), EmailSend creates an identifier for each email sent.
This identifier is stored in the Email.MailIdentifier variable and it can be used by EmailStatus to find out the current status of the email.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Linux wd230com.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment