Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

SendEmailExt

  • Last UpdatedOct 29, 2026
  • 2 minute read

SendEmailExt is a built-in function that sends email messages with attachments.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

SendEmailExt

Email

Asynchronous

No

Supported

Supported

Not supported

Supported

Not supported

Syntax

SendEmailExt(strSubject,strMessage,strTo,optStrCc,optStrBcc,optStrFile1,…,optStrFileN)

strSubject

The email subject (up to 1024 characters).

strMessage

The email message (up to 900 characters).

strTo

The recipient's address. You can specify more than one recipient, using a semicolon (;) to separate the addresses.

optStrCc

The recipients' addresses to be Cc'ed. You can specify more than one recipient, using a semicolon (;) to separate the addresses.

This is an optional parameter, but if you need to use subsequent parameters, then you can specify a null string ("") here.

optStrBcc

The recipients' addresses to be Bcc'ed. You can specify more than one recipient, using a semicolon (;) to separate the addresses.

This is an optional parameter, but if you need to use subsequent parameters, then you can specify a null string ("") here.

optStrFile1…optStrFileN

Complete file paths and names of file attachments.

Note: Follow the conventions of the target platform for the file path and name, and separators. For example, a file path in Windows starts with a drive letter and uses backward slashes as separators (C:\path\to\file), while a file path in Linux starts at the root directory and uses forward slashes as separators (/path/to/file).

Return value

This function returns one of the following possible values:

Value

Description

-4

Some or all of the specified file attachments were not found.

-3

Wrong number of parameters (at least three parameters are required).

-2

The library INDMail.DLL is the wrong version.

-1

The library INDMail.DLL is corrupted.

0

Function executed successfully.

1

Cannot send email because another email is still pending.

2

Cannot send email because a new thread cannot be created.

15

Data Protection is enabled (see Notes below).

Notes

In order to send email, configure the email settings with the CnfEmail function, or use the E-mail Settings tab of the E-Mail and FTP configuration dialog to configure your project's email settings. Incorrect settings can result in several different error codes (see above).

This function cannot be executed on thin clients (in the Viewer module) when Data Protection is enabled. It can only be executed on the project runtime server. For more information, see Enable Data Protection to encrypt sensitive information.

Examples

SendEmailExt("Subject","Message","Sam@universe.com","","","C:\Projects eport.txt")

SendEmailExt("Subject","Message","David@Ohio.net","Ted@Austin.com","Bart@Springfield.gov","C:\TechRef51.doc")

In This Topic
Related Links