Within a custom module I am trying to send an email but it goes into the spam folder when the email is to a gmail email address.
I am using drupal_mail[1] and then I implement hook_mail[2] to add the subject, headers and body to the message array. The header is a Content-Type of text/html (see below), but if I don't include the headers in the message array then it does not go in the spam folder but then I can't use any html tags within the email body.
[1]
http://api.drupal.org/api/drupal/includes--mail.inc/function/drupal_mail/6
[2]
http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_mail/6
$headers = array('MIME-Version' => '1.0','Content-Type' => 'text/html; charset=iso-8859-1','Content-Transfer-Encoding' => '8Bit','X-Mailer' => 'Drupal',);