Skip to main content

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 Wed, 05/10/2023 - 15:32

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

Client.Email

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

Syntax

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

Parameters

[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

None

Remarks

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.

Type

None

Example

Sub Main

' Send an email.

Client.Email "jane.smith@example.com", "", "Test Data Transfer", "This is a file transfer", "Sample-Inventory.IMD", 50

End Sub

Owen Tomme Thu, 03/07/2024 - 16:57

In reply to by Brian Element

Hi Brian,
 
Is there a segment in this code that would allow me to include my email signature (from Outlook) when the email goes out?
 
If not, is there a different code that could be used to include email signature, and if so, what would it be?

Brian Element Fri, 03/08/2024 - 09:01

In reply to by Owen Tomme

Hi Owen,

Unfortunately I don't know of any code that would allow for this.  You might want to ask Caseware support or at least they could add it as a possible addon for future versions.

gourangshah24 Thu, 11/14/2024 - 01:31

Hi Brian,

Is it possible to write a script to pickup email address from the column where there are different email addresses and send the excel extract to that email without manual intervention?

The website encountered an unexpected error. Try again later.