Forum Discussion
David_Gill
Nov 06, 2015Cirrus
I had a requirement to send an email with an attachment using a bash script and in doing so discovered that the email message could also contain html formatting. I used Mark's HTTP Super SIDEBAND Requestor to call the script to send the email. Once you have this setup you can simply call it from an irule event. Definitely not as easy as filling out a box in the VPE but it works well once the heavy lifting is done.
Here is a sample script which simply paints a number blue – I think it demonstrates the capabilities…
!/bin/bash
(echo "Subject: Your Secret Password "
echo "To: toaddress@company.com"
echo "Content-Type: TEXT/HTML; charset=US-ASCII"
echo ""
echo ""
echo ""
echo "Your password is: 12345"
echo "
") | sendmail toaddress@company.com