ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / Managing emails
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
Populates a variable of type Email using the content of its Source property or the different variables of the Email structure using the content of the Email.Source variable.
Remark: This function can be used to read an .eml file (generated by Outlook Express).
Example
// Read the .eml file
Email.Source = fLoadText("c:\MyEmails\Test.eml")
IF EmailImportSource() = True THEN
Info("The test.eml file was imported")
END
Syntax
<Result> = EmailImportSource([<Email>])
<Result>: Boolean
  • True if the Email variable or the Email structure has been populated,
  • 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 the current thread or in the Source property of the Email variable used.
<Email>: Optional Email variable
Name of the Email variable that corresponds to the email to be initialized. If this parameter is not specified, the Email structure will be used.
Remarks
  • To generate the source code of the email to be sent from the email structure (the content of the Email.Source variable) or from the Source property of the Email variable, use EmailBuildSource.
  • The files in MSG format (generated by MS Outlook) are not automatically imported.
  • The source of the email must use the CR separator to mark the end of lines, including in Linux.
  • If the project configuration uses ANSI strings at runtime, characters are converted to "latin1" by default, regardless of the "charset" specified in the HTML part of the email. If UNICODE is used at runtime, characters are not converted. To avoid converting to ANSI and keep the encoding of the "charset" specified in the HTML part of the email, use EmailConfigure with the emailParameterHTML constant :
    EmailConfigure(emailParameterHTML, True)
Component: wd290com.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help