NYCPHP Meetup

NYPHP.org

[nycphp-talk] Email not working

Donald J. Organ IV dorgan at optonline.net
Sun Nov 14 02:22:11 EST 2004


look up the headers you have yo set http://www.php.net/mail

----- Original Message ----- 
From: "Joseph Crawford" <codebowl at gmail.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Saturday, November 13, 2004 9:19 PM
Subject: [nycphp-talk] Email not working


> guys i have a mail function call however it is sending the HTML as
> text and not an HTML email, can anyone here help me out?  Here are the
> headers from the email source
>
> To: codebowl at gmail.com
> Subject: Demonoid Account Confirmation
> MIME-Version: 1.0
>
> Content-type: text/html; charset=iso-8859-1
>
> From: Demonoid <accounts at demonoid.com>
> X-Mailer: PHP/4.3.9\r\n
> Message-Id: 
> <20041114021655.2D9285282D8 at vt-fairhaven1a-82.bur.adelphia.net>
> Date: Sat, 13 Nov 2004 21:16:55 -0500 (EST)
>
> <html>
> <head>
>
> and here is the code
>
> function sendRegistrationEmail( $configs, $tpl, $email, $confirm ) {
> $tpl->assign('code', $confirm);
> $tpl->assign('url', $configs->getSiteURL()."/confirm.php?code=".$confirm);
> $tpl->assign('confirm_page', $configs->getSiteURL()."/confirm.php");
> $sitename = $configs->getSiteName();
> $tpl->assign('sitename', $sitename);
>
> $body = $tpl->fetch('email/confirm_email.tpl');
>
> $headers  = "MIME-Version: 1.0\r\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
> $headers .= "From: ".$sitename." <".$configs->getSiteEmail().">\r\n";
> $headers .= "X-Mailer: PHP/" . phpversion().'\r\n';
>
> mail($email, $sitename." Account Confirmation", $body, $headers) or
> trigger_error('email not sent :(', E_USER_ERROR);
> }
>
> i am not sure what is going on but it's not working :(
>
> -- 
> Joseph Crawford Jr.
> Codebowl Solutions
> codebowl at gmail.com
>
> For a GMail account
> contact me OFF-LIST
> _______________________________________________
> New York PHP Talk
> Supporting AMP Technology (Apache/MySQL/PHP)
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.newyorkphp.org 




More information about the talk mailing list