Kaseya Community

HTML Email

This question is answered

Hi Guys,

Might be the worlds easiest question. I'm looking for a way to have an agent procedure produce a HTML email instead of plaintext. I've run into the age old problem of returning powershell information in table format that just doesn't work nicely within the constraints of the plaintext emails assigned within Kaseya (6.2).

Any help would be more than welcomed!

Cheers,

Neal

Verified Answer
  • I was unable to find a way to do this with only kscripting.  Although in my situation I had an html file on a remote server that I wanted to send as an html formatted email, and no local smtp server was available.

    In the end, I set up a gmail account, installed stunnel and blat, configured stunnel to connect to the gmail smtp servers and then sent the email out through blat over the tunnel created to the gmail smtp servers.

    www.stunnel.org

    www.blat.net

    www.jeffkastner.com/2010/01/blat-stunnel-and-gmail/

    I put together a small KScript that took care of the initial setup and configuration of stunnel to gmail and blat.  After that, I could make a command line call to blat to send out html files as html formatted emails direct from a managed machine to my ticketing system, or to a distribution list.

    Let me know if you want more info.

All Replies
  • I was unable to find a way to do this with only kscripting.  Although in my situation I had an html file on a remote server that I wanted to send as an html formatted email, and no local smtp server was available.

    In the end, I set up a gmail account, installed stunnel and blat, configured stunnel to connect to the gmail smtp servers and then sent the email out through blat over the tunnel created to the gmail smtp servers.

    www.stunnel.org

    www.blat.net

    www.jeffkastner.com/2010/01/blat-stunnel-and-gmail/

    I put together a small KScript that took care of the initial setup and configuration of stunnel to gmail and blat.  After that, I could make a command line call to blat to send out html files as html formatted emails direct from a managed machine to my ticketing system, or to a distribution list.

    Let me know if you want more info.

  • Thanks for that information. Not sure how we are going to proceed just yet but that definitely gives us an option going forward.

  • i just made some vb that sends emails directly to the recipients mail server so you dont have to setup anything, which is far less pissing around as you dont need accounts to be setup

  • Can you please share your code. Which account did you send as, this is where i got stuck.

  • Michael: Does that require modification per client or does it dynamic pull the required server details?

  • ok well this is my story.

    I wanted to beable to change the from address for alarms so when people reply to them they could go to someone useful. I also find having to manage email addresses in a thousand places rather tedious and impossible if you want the emails to go to different places based on the time of the day.

    So i created some custom fields against the ORG's and put the from address and a TO address during hours and TO address afterhours

    i then have all my alarms calling scripts (as you should) and they eventually call my vb that runs on the VSA and has the relevant info passed to it. It runs on the VSA because i know it can send out emails obviously alot of clients have that sort of thing blocked unless coming from their exchange box.

    If the from address passed to my app is fake the emails will get picked up as spam. but that not a problem because that's the whole point of this script. When people reply it goes to the correct team ie SQL issues to the SQL guys.

    My app then takes the TO address and does an nslook up to find the clients mail server  and then it simply sends the email directly to it via smtp. I dont need any accounts setup or any smtp servers setup from my end. all i need is a valid to and from address otherwise it's considered spam

    when i wrote this script i also looked on the net and found a huge number of people going on about needing smtp servers and accounts setup . blah blah but non of that makes sense

    You need a "Server" to receive emails but not to send them. You need an "account" to prevent others viewing you emails but it doesn't stop me from send mails as you

    By the way there are no problems with mailmarsha or message labs and the symantec one

  • Thanks Michael.

    That makes complete sense! I've just been over thinking things it would seem.