BuiltIn.SendMail Method

Applies to TestComplete 15.64, last modified on June 12, 2024


The SendMail method sends an e-mail message to the specified address. It also lets you specify the files that must be sent with this message as attachments.

This method is available if the BuiltIn plugin is installed and enabled. The plugin is installed and enabled by default.


BuiltIn.SendMail(PortNumber, ToAddress, FromHost, FromName, FromAddress, Subject, Body, FileName1, FileName2, ...)

PortNumber [in]    Optional    String    
ToAddress [in]    Required    String    
FromHost [in]    Required    String    
FromName [in]    Required    String    
FromAddress [in]    Required    String    
Subject [in]    Required    String    
Body [in]    Required    String    
FileName1 [in]    Optional    String    
FileName2 [in]    Optional    String    
Result Boolean

Applies To

The method is applied to the following object:


The method has the following parameters:


The valid port number between 1 and 65353 (by default set to 25).


The e-mail address to which the message will be sent. You can specify several addresses separated by commas or semicolons.


The host from which the message will be sent.


The “user-friendly” name of the e-mail sender. If it is not necessary to specify the name, you should pass an empty string to this parameter.


The e-mail address from which the message will be sent.


The message subject.


The message body.

FileName1, FileName2, ..., FileNameN

The full paths to the files you want to send with the message.

Result Value

True if the message was sent successfully, and False otherwise.


See an example in Sending Email From Scripts.

See Also

Sending Email From Scripts

Highlight search results