You are here: mail() To: header in PHP 4.4.4 « PHP Programming Language « IT news, forums, messages
mail() To: header in PHP 4.4.4

Posted by Andrew Aronoff on 11/05/86 11:56

I'm using the mail() function on a Linux server.

Under PHP 4.4.3, the followng code worked as expected:

$dest="webmaster@mydomain.com";
$subject="something here";
$body="contents here";
$headers = "From: fname lname <name@xxx.com\n"."To: myfname mylname
<webmaster@mydomain.com>" ;

mail($dest,$subject,$body,$headers)

The received email message contained the following headers:

To: myfname mylname <webmaster@mydomain.com>
From: fname lname <name@xxx.com
Subject: something here

Under PHP 4.4.4, the code works differently. The additional_parameters
"To:" data is concatenated to the initial "to" parameter and no longer
replaces it.

The received email message contains the following headers:

To: webmaster@mydomain.com, myfname mylname <webmaster@mydomain.com>
From: fname lname <name@domain.com
Subject: something here

What are the (new) rules for the mail() function to obtain a To: field
formatted as "fname lname <name@domain.com>"?

Is this rules change documented somewhere?

regards, Andy
--
**********

Please send e-mail to: usenet (dot) post (at) aaronoff (dot) com

To identify everything that starts up with Windows, download
"Silent Runners.vbs" at www.silentrunners.org

**********

 

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

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