automatically send mail in IDEA.

5 posts / 0 new
Last post
ortizmario6025@...
Offline
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
Offline
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:

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
Offline
Joined: 02/29/2024 - 14:48

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's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

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.

ortizmario6025@...
Offline
Joined: 09/03/2021 - 11:54

good