cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

challenges using Mail() to auto mailling report

dadawasozo
Level IV

 

Hi,

I need to automated sending a graph in email body and attach a table daily. I'm having 3 issues now and hope someone can help.
issue 1) : Not able to get graph into mail body. How I can do that? I simply tried below and no graph in body and it complains that character is needed, which indicating not allow picture?

graph << Get As Report();
mail("XXX@XXX", "test", "Visualization " ||"\!n"|| Eval(graph << Get Text), "test.csv")


issue 2): on above it able to get the title in the graph added to mail body but not the graph. The test.csv is not attached.


issue 3): can JSL auto select the "Allow" when it appears without human interaction? (see below)

dadawasozo_0-1685795918641.png


Note: I able to get both the table and graph as attachment, but that dont meet customer requirement and the issue 3 still remain. Really appreciate if someone can help me.

 

4 REPLIES 4
jthi
Super User


Re: challenges using Mail() to auto mailling report

You could send the email by using vbscript or powershell and call those with JSL. For example with Powershell you can send email with HTML body and in there you can embed images of graphs and embed tables.

-Jarmo
dadawasozo
Level IV


Re: challenges using Mail() to auto mailling report

Hi Jarmo,

 

Do you by chance has any example using html?
Will that solve also the issue of my issue3)?

vvm
vvm
Level I


Re: challenges using Mail() to auto mailling report

Hello Jarmo or dadawasozo,

 

I am looking for the same and do you guys have a solution for this? 

thank you

 

jthi
Super User


Re: challenges using Mail() to auto mailling report

I cannot share the script which I use but if I remember correctly the idea is something like this https://stackoverflow.com/questions/52837468/embed-images-in-email-and-send-via-powershell . I would guess you could also use VB Script but I haven't looked into that option.

-Jarmo