PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Example with an Email variable
  • Example with the Email structure
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
Generates the source code of outgoing email from the variables currently found in the email structure or in an Email variable.
The source code is generated in the Email.Source variable or in the ..Source property of Email variable. Then, this source code can be saved in a .eml file for example.
Note: This function is useful to modify an element found in an outgoing email. The email can be sent by EmailSend. See Writing a custom email for more details.
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.
Example

Example with an Email variable

// Initialize the variable
MyMessage is Email

Add(MyMessage..Recipient, "support_test@pcsoft_test.fr")
MyMessage..Sender = "customer@company.fr"
MyMessage..Message = "Auto Email Test"

// Create the .eml file
IF EmailBuildSource(MyMessage) = True THEN
fSaveText("c:\MyEmails\Test.eml", MyMessage..Source)
END

Example with the Email structure

// Initialize the email structure
Email.NbRecipient = 1
Email.Recipient = "support_test@pcsoft_test.fr"
Email.Sender = "customer@company.fr"
Email.Message = "Auto Email Test"

// Create the .eml file
IF EmailBuildSource() = True THEN
fSaveText("c:\MyEmails\Test.eml", Email.Source)
END
Syntax
<Result> = EmailBuildSource([<Email> [, <Advanced Options>]])
<Result>: Boolean
  • True if the source code was generated,
  • False otherwise. The ErrorOccurred variable is set to True if an error occurs.
    To find out the error details, use ErrorInfo associated with the errMessage constant. The generated code can be read in the Email.Source variable of current thread.
<Email>: Optional Email variable
Versions 15 and later
Name of Email variable to use.
New in version 15
Name of Email variable to use.
Name of Email variable to use.
If this parameter is not specified, the email structure is used.
<Advanced Options>: Optional Integer constant
Versions 22 and later
Combination of following constants:
emailOptionEncodeHeaderEncodes the message header in base 64.
The message header is not encoded by default. This constant prevents the emails with wrongly encoded accented characters.
Versions 22 and later
emailOptionHeaderBcc
New in version 22
emailOptionHeaderBcc
emailOptionHeaderBcc
Used to add the non-official recipients into the source code of email header.
New in version 22
Combination of following constants:
emailOptionEncodeHeaderEncodes the message header in base 64.
The message header is not encoded by default. This constant prevents the emails with wrongly encoded accented characters.
Versions 22 and later
emailOptionHeaderBcc
New in version 22
emailOptionHeaderBcc
emailOptionHeaderBcc
Used to add the non-official recipients into the source code of email header.
Combination of following constants:
emailOptionEncodeHeaderEncodes the message header in base 64.
The message header is not encoded by default. This constant prevents the emails with wrongly encoded accented characters.
Versions 22 and later
emailOptionHeaderBcc
New in version 22
emailOptionHeaderBcc
emailOptionHeaderBcc
Used to add the non-official recipients into the source code of email header.
Remarks
To fill the email structure or an Email variable from the content of its ..Source property, use EmailImportSource.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Linux wd230com.so
Android wd230android.jar
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment