473,396 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

mail() To: header in PHP 4.4.4

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

Under PHP 4.4.3, the followng code worked as expected:

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

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

The received email message contained the following headers:

To: myfname mylname <we*******@mydomain.com>
From: fname lname <na**@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: we*******@mydomain.com, myfname mylname <we*******@mydomain.com>
From: fname lname <na**@domain.com
Subject: something here

What are the (new) rules for the mail() function to obtain a To: field
formatted as "fname lname <na**@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

**********
Aug 26 '06 #1
3 1542
Andrew Aronoff wrote:
mail($dest,$subject,$body,$headers)

add new value after headers:

, "-f****@MAIL.XX")

and that is it, works for me!
Aug 26 '06 #2
>add new value after headers:
>
, "-f****@MAIL.XX")
I want email addresses to be in the format "fname lname <address>".

Please show how that can be done for the To: address so that only a
single address appears in the To: header:

To: fname lname <address>

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

**********
Aug 26 '06 #3
*** Krzysiek escribió/wrote (Sat, 26 Aug 2006 14:16:04 +0200):
, "-f****@MAIL.XX")

and that is it, works for me!
This sets the return path parameter, so undelivered mail gets returned to
that address.
--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Aug 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Web Master | last post by:
Hi, I am having a little issue with Jacks Form mail php script. I have installed it and configured the form to get it to work, but for some bizarre reason I have 2 issues I can't seem to debug....
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
3
by: Spr | last post by:
My problem is that code does not execute cariage return in the body message: "<?xml version="1.0"?> <g:propertyupdate xmlns:g="DAV:" xmlns:e="http://schemas.microsoft.com/exchange/"...
1
by: bobano | last post by:
Hi everyone, I am writing a POP3 Client program in Perl. You connect to a POP3 Server and have a running conversation with the mail server using commands from the RFC 1939 Post Office Protocol....
2
by: clevrmnkey | last post by:
I've had nothing but trouble from the System.Net.Mail objects, but I finally need to make them work, and I can't for the life of me see what I'm doing wrong. I pared back my mail transaction to...
8
by: travispennington | last post by:
To anyone that can assist me: I deeply appreciate your help!! I am developing an application with an outside vendor. The vendor has a very odd requirement. They need custom X-Headers added to...
5
by: Joker7 | last post by:
Hi, I use the script below to send a email from a contact form but it would be nice if the conformed sent page showed what was sent.Question how can I do this ? Thanks Chris <?php $mailto...
6
by: Call Me Tom | last post by:
The following simple script receives data from a form and sends me an email. It works fine on my testing machine (xampp for windows). However, when I upload it to my web host, the script processes...
5
by: sui | last post by:
this is my code import sys, os, glob, datetime, time import smtplib ## Parameters for SMTP session port=587 SMTPserver= 'smtp.gmail.com' SMTPuser= '...@gmail.com' pw= 'fill in here'...
4
by: dragon52 | last post by:
Hi there, I am writing php to send email containing Chinese text. The chinese displays correctly depending on different mail servers, it seems. I can read the chinese text if I open the email...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.