Jump to content
Sign in to follow this  
frankb

Send Email with script and dynamic body

Recommended Posts

Hi,

i have a script which collects offline Servers from the database and i want to send this list in an email . Today i put the list in a file and then attach the file with the

send email function. But  it would be much better to have the list inside the email body and not as attachement.

Any suggestions ?

Regards

Frank

Share this post


Link to post
Share on other sites

Try the Variable Set: File Contents script function to load the file contents into a variable, which can then used in the Email body.

If the contents are plaintext (no HTML formatting), put <PRE> around the variable in your email body like:

<PRE>@FileContents@</PRE>

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Dude, you just saved me an ongoing headache of "save %shellresult% to file, upload file, attach file to email" to get around the problem of badly-formatted console command output, THANK YOU.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×