Jarrod

Using LUA script to Email sends email body as text. how to change to HTML?

Discussion created by Jarrod on Mar 24, 2012
Latest reply on Mar 24, 2012 by Jarrod

I am looping through Alarms with LUA and then keeping the information in a buffer variable and then calling action.email with the recipient and subject and the buffer in the body. The email sends but the Body is in plain text even though it is HTML format. How can i fix this?

 

 

<TABLE cellspacing=0 cellpadding=0 width='100%' border=0> <tr><td><table width='100%' border=0 background='gray' bgcolor='#BFD4F9'><tbody> <tr>  <td width='2%'><table width=20 height=18 border=1 bgColor='#FF0000'><tr><td></td></tr></table></td>

 <td width='20%'><b><font color='#FFFFFF'>10.236.1.113[p-kp-svr01]</font></b></td>

 <td width='20%'><b><font color='#FFFFFF'>CPU</font></b></td>

 <td width='25%'><b><font color='#FFFFFF'>Robot: p-kp-svr01</font></b></td>  <td width='25%'><b><font color='#FFFFFF'>Probe: cdm</font></b></td> </tr></tbody></table></td></tr> <tr><td width='100%' bgColor='#FFFFFF'><b>Time:</b>2012-03-23 11:13:50, <b>Arrival Time:</b>2012-03-23 11:14:00, <b>Count: </b>24, <b>Assigned To: </b>N/A</td></tr> <tr><td><b>Message:</b>Average (5 samples) total cpu is now 51.19%, which is above the warning threshold (50%)</td></tr> </TABLE> </BODY></HTML>

Outcomes