PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
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
Generates the source code of the outgoing email from an Email variable.
The source code is generated in the Source property of the Email variable. Then, this source code can be saved in a .eml file for example.
Remark: This function is useful to modify an element found in an outgoing email. The email can be sent by EmailSend. For more details, see Writing a custom email.
Example
// Initialize the variable
MyMessage is Email
 
Add(MyMessage.Recipient, "support_test@pcsoft_testfr")
MyMessage.Sender = "customer@company.fr"
MyMessage.Message = "Auto Email Test"
 
// Create the .eml file
IF MyMessage.BuildSource() = True THEN
fSaveText("c:\MyEmails\Test.eml", MyMessage.Source)
END
Syntax
<Result> = <Email>.BuildSource([<Advanced options>])
<Result>: Boolean
  • True if the source code was generated,
  • False otherwise. If an error occurs, the ErrorOccurred variable is set to True.
    To get more details on the error, use ErrorInfo with the errMessage constant. The generated code can be read in the Email.Source variable of current thread.
<Email>: Email variable
Name of the Email variable to be used.
<Advanced options>: Optional Integer constant
Combination of following constants:
emailOptionEncodeHeaderEncodes the message headers in Quoted-Printable if necessary.
The message header is not encoded by default. This constant prevents the emails with wrongly encoded accented characters.
emailOptionHeaderBccUsed to add the non-official recipients into the source code of email header.
Remarks
To populate a variable of type Email using the contents of its Source property, use <Email variable>.ImportSource.
Component: wd270com.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment