cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
lou
lou
Level III

Using JSL to send emails

I'm trying to use JSL to send emails as part of a data retrieval query.  How do I embed a data table or Journal table into the body of my text message?

Thanks

18 REPLIES 18
Stefan
Level III

Re: Using JSL to send emails

Hi, this is the print screen...I think the issue might be the fact that I am not using Outlook as the email client, I am using Mailbird. Will try to configure Outlook and update

Stefan_0-1611910053082.png

 

lalala
Level I

Re: Using JSL to send emails

Hi. is there a way the alignment per column be fixed? or if i could change the default font style used in this HTML email, cause it seems that the column is not align due to the letters in the default font style(arial) used takes different space per letter(like "I" has different space than "M"). so is there a way to change the font style or any other suggestion how to fix the alignment per column. thank you. 

SDF1
Super User

Re: Using JSL to send emails

Hi @lalala ,

 

  Not sure if there is a way to do it with the commands that were listed previously in this thread. The text is just tab-delimited and you can edit it in the email. I am not aware of any commands to modify this when sending the table as text 

 

  However, there is a possible workaround that might suit your needs. You have to get the data table report as a picture, save it, and then send it as an attachment. It will look like the data table format in JMP report windows.

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
dt = Data Table( "Big Class" );
path="your path\"; //be sure to have the last backslash included in this.
tb=dt<<Get As Report();
tb<<Get Picture();
tb<<Save Picture(path||"pic.png", "png");
Mail("my.email@email.com", "dt names", "The data is \!n", path||"pic.png");

  You can of course save the picture in different formats than png.

 

  The attachment will look like this:

pic.png

 

Not ideal, but the data will be formatted and aligned as desired. It won't be editable or copy/pastable like the text email version. Perhaps you can put in a request to JMP to have them provide more options for the Get Text() command so it can provide more complex formatting options?

 

Hope this helps!,

DS

lalala
Level I

Re: Using JSL to send emails

hi. Thank you for your quick response.

 

But, I would like to ask again, could there be a possibility that I could attach the photo to the mail's body? Thank you in advance. 

SDF1
Super User

Re: Using JSL to send emails

Not that I'm aware of.
Stefan
Level III

Re: Using JSL to send emails

Hi, it was indeed the email client. I uninstalled Mailbird and used Outlook and worked fine...

Thank you for your help!

SDF1
Super User

Re: Using JSL to send emails

Glad to hear that you figured out the mail client issue. Odd that it should be so dependent on that, but so are carriage returns. Glad it's now working for you.

DS
dadawasozo
Level IV

Re: Using JSL to send emails

Hi DS,

Is it possible to to send picture in the email body (not attachment) and at the same time attach a table? The Eval () and get text not working for picture

SDF1
Super User

Re: Using JSL to send emails

Hi @dadawasozo ,

 

  Not that I'm aware of, I believe you can only add it as an attachment, not within the body of the email. I think it can only handle text in the email.

 

DS