automatically send mail in IDEA.
ortizmario6025…
Forums
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?
Hi there, here is the
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