amelton
·
Edited by
tariqrahiman
Email Excel results file
I am looking for the code block which would take an Aquascript created in AquaData Studio and attach the results to an email as an Excel attachment. Specifically, what is the argument for the sendEmail function? In the CompanyRevenueAdvanced example, it is sendEmail(request) but request is not defined in my query.
I've been through the OpenAPI interface documentation, but I can't seem to get the data server the parameters right to create and send the attachment.
Thanks.
I've been through the OpenAPI interface documentation, but I can't seem to get the data server the parameters right to create and send the attachment.
Thanks.
1 attachment
-
2 KB
1 comments
Hi Andrew,
>>I am looking for the code block which would take an Aquascript created in AquaData Studio and attach the results to an email as an Excel attachment.
I did not quite understand this. Can you please clarify?
Regarding sendMail() API, I have attached a sample AquaScript that executes a query, save the results as excel and send an email using sendMail().
sendmail() takes AQMailMessage Instance as parameter. AQMailMessage API allows user to set the required values for an email message like From, To, Subject, Body, Attachments etc.. You can create a new email message as follows:
var email = aqua.mail.newMessage();
Here are references to the relevant OpenAPIs : http://docs.aquafold.com/
http://docs.aquafold.com/
In the sample AquaScript, we are using the default email queue and you may configure the same in Aqua Data Studio by navigating to File -> Options -> E-mail -> E-mail Queue and Enable queue.
Thanks. Hi Andrew, >>I am looking for the code block which would take an Aquascript created in AquaData Studio and attach the results to an email as an Excel attachment. I did not quite understand this. Can you please clarify? Regarding sendMail() API, I have attached a sample AquaScript that executes a query, save the results as excel and send an email using sendMail(). sendmail() takes AQMailMessage Instance as parameter. AQMailMessage API allows user to set the required values for an email message like From, To, Subject, Body, Attachments etc.. You can create a new email message as follows: var email = aqua.mail.newMessage(); Here are references to the relevant OpenAPIs : http://docs.aquafold.com/ads/13.0/openapi/com/aquafold/openapi/mail/AQMailQueue.html http://docs.aquafold.com/ads/13.0/openapi/com/aquafold/openapi/mail/AQMailMessage.html In the sample AquaScript, we are using the default email queue and you may configure the same in Aqua Data Studio by navigating to File -> Options -> E-mail -> E-mail Queue and Enable queue. Thanks.