automatically send mail in IDEA.

Primary tabs

3 posts / 0 new
Last post
Joined: 09/03/2021 - 11:54
automatically send mail in IDEA.

Hello, Does anyone have a macro to send automatic mail in IDEA.I am carrying out several daily test extractions, I must send the result by email in Excel, of course after exporting it, but I want to do it automatically, without going into each Excel generated and manually sending it from IDEA.
Do you have something out there that you can enlighten me on?

Brian Element's picture
Brian Element
Joined: 07/11/2012 - 19:57

Hi there, here is the information on this from the language browser with a snippet of code you can look at:


Sends an email with a file attachment. The task is canceled if it exceeds the specified timeout period.


Client.Email(toNames As String, ccNames As String, Subject As String, Body As String, Attachments As String, TimeoutInSeconds As Integer)


[in] toNames

A list of primary recipient email addresses. Each email address is separated by a semicolon (;).

[in] ccNames

A list of email addresses to send carbon copies (cc) to. Each email address is separated by a semicolon (;).

[in] Subject

The email subject.

[in] Body

The body of the email message.

[in] Attachments

(Optional) The file attachment.

[in] TimeoutInSeconds

The number of seconds the task will try sending the email before it times out. You can enter a value between 1 and 2,147,483, inclusively. You can also enter -1 so that the task never times out.

This parameter is required for the script to successfully run; however, it only applies when sending emails using a webmail account. It is ignored when using the default mail client.

Return Value



When working with an application such as Microsoft Outlook, you must give permission for IDEA to send the email.

Client.Email uses the email option defined in the IDEA Options dialog box.

When using webmail, the ccNames parameter is ignored as it is not supported.




Sub Main

' Send an email.

Client.Email "", "", "Test Data Transfer", "This is a file transfer", "Sample-Inventory.IMD", 50

End Sub

Joined: 09/03/2021 - 11:54