You are here: Re: Problems with headers using mail() function « PHP Programming Language « IT news, forums, messages
Re: Problems with headers using mail() function

Posted by Jerry Stuckle on 06/13/07 11:11

Spartacus wrote:
> Oops, I meant to write:
>
>
> function send_mail($to_name, $to_email, $from_name, $from_email,
> $subject, $message)
> {
> $thedate = date("r", time());
>
> $headers = "X-Mailer: PHPMailProgram/1.0\n";
> $headers .= "From: \"".$from_name."\" <".$from_email.">\n";
> $headers .= "Date: $thedate\n";
> $headers .= "Content-Type: text/plain\n\n";
>
> $to = "\".$to_name."\" <".$to_email.">";
>
> return mail( $to, $subject, $message, $headers);
> }
>
> Sorry 'bout that.
>
> Thank you,
> Spartacus

First of all, please learn to REPLY to messages instead of starting a
new thread every time.

And why are you putting quotes in the from and to headers?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация