Re: mail function and headers
| From: | Alain Roger | Date: | Wed, 12 Mar 2008 15:45:16 +0000 |
| Subject: | Re: mail function and headers | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271391@lists.php.net to get a copy of this message | ||
ok, so this is what i got and it is still remaining... :-(
Received: from serdev ([127.0.0.1]) by home.com with MailEnable ESMTP; Wed,
> 12 Mar 2008 16:40:18 +0100
> Date: Wed, 12 Mar 2008 16:40:18 +0100
> Subject: subject 3
> To: mymail@tek.com
> From: raf, news <news.raf@gmail.com>
> Reply-To: news.raf@gmail.com
> Return-Path: <webmaster@localhost_home.com>
> X-Mailer: PHP/5.2.4
> MIME-Version: 1.0
> Content-type: text/plain; charset=iso-8859-1
> Content-Transfer-encoding: 7bit
>
as you can see my Return-Path is still pointing on the wrong direction :-(
any other idea ?
A.
On Wed, Mar 12, 2008 at 4:11 PM, spacemarc <spacemarc@gmail.com> wrote:
> 2008/3/12, Daniel Brown <parasane@gmail.com>:
> > You have the From: header parameters reversed. Try this:
> >
> > <?
> > $headers = "From: ".$fromname." <".$email.">\r\n";
> > $headers .= "Reply-To: ".$email."\r\n";
> > $headers .= "X-Mailer: PHP/".phpversion()."\r\n";
> > /*
> > ....
> > */
> > ?>
>
> you can add these headers:
>
> $header = "From: $fromname<$email>\n";
> $header .= "Reply-To: $email\n";
> $header .= "Return-Path: <$email>\n";
> $header .= "X-Mailer: PHP/" . phpversion() . "\n";
> $header .= "MIME-Version: 1.0\n";
> $header .= "Content-type: text/plain; charset=iso-8859-1\n";
> $header .= "Content-Transfer-encoding: 7bit\n";
>
> Try it.
>
> --
> Scripts: http://www.spacemarc.it
>
--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008