[support] Within a custom module I am trying to send so that an email is sent but I get the error The submitted from address () is not valid.

John Mitchell mitchelljj98 at gmail.com
Fri Aug 19 15:40:14 UTC 2011


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.
>

John

>
> [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',
>
>           );
>
>
>

-- 
John J. Mitchell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110819/5d1feb12/attachment.html 


More information about the support mailing list