I am developing function that send a email to user..,and i want to add some html.css styleing to the email how can i achive that folllwing is my code i tried
function zgcrons_mail ($key, &$message, $params) {
switch ($key) {
case 'mymail':
// Set headers etc
$message['to'] = $usermail;
$message['subject'] = t('Your Donation Statues ');
$message['body'][] = '<table width="100%" cellspacing="0" cellpadding="10" border="0">
<tbody>
<tr>
<td valign="middle" style="border-collapse:collapse;border:0" colspan="2">
<div style="color:#585858;font-family:Georgia;font-size:12px;line-height:125%;text-align:center">
<a target="_blank" style="color:#ee3524;font-weight:bold;text-decoration:underline" href="http://www.twitter.com/ZealousGood/">follow on Twitter</a> |
<a target="_blank" style="color:#ee3524;font-weight:bold;text-decoration:underline" ref="http://www.facebook.com/ZealousGood2011">friend on Facebook</a>
</div>
</td>
</tr>
<tr>
<td width="372" valign="top" style="border-collapse:collapse">
<div style="color:#585858;font-family:Georgia;font-size:12px;line-height:125%;text-align:center">
<em>Copyright © 2012 Zealous Good, All rights reserved.</em>
<br>
</div>
</td>
</tr>
</tbody></table>';
break;
}
}
drupal_mail('zgcrons', 'mymail',$usermail, $language, $params = array('username' =>'John Potato'), $from = NULL, $send = TRUE);