configuring headers in mail() ...
| From: | Maxim Maletsky | Date: | Fri, 02 Feb 2001 07:20:30 +0000 |
| Subject: | configuring headers in mail() ... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-37798@lists.php.net to get a copy of this message | ||
Hello Guys,
to be short:
1. what I'm doing:
I need to send some email recipients of which are some users from a
database. (this part perfectly works)
What I care about is that when they receive the email they see 'J-Door
Newsletter' in their from field, not our email address (
'newsletter@j-door.com' <mailto:'newsletter@j-door.com'> )
3. how I'm doing it:
below is the PHP code followed by what message header looks like on received
email.
<snip>
$from = '"' . $POSTED['from_name'] . '" <' .
$POSTED['from_email'] . '>';
mail( $rec['email'],
stripslashes($POSTED['subject']),
stripslashes(str_replace('%name%', $rec['name'],
$POSTED['body'])),
"FROM: $from
\nContent-Type: text/plain; charset=$encode
\nContent-Transfer-Encoding: 8bit"
);
</snip>
</snip>
Received: from japaninc.net ([210.229.233.105]) by
exc-tyo-01.lincmedia.co.jp with SMTP (Microsoft Exchange Internet Mail
Service Version 5.5.2650.21)
id DZ8G4JTZ; Fri, 2 Feb 2001 16:10:11 +0900
Received: (from nobody@localhost)
by japaninc.net (8.9.3/8.9.3) id QAA10798;
Fri, 2 Feb 2001 16:01:03 +0900
Date: Fri, 2 Feb 2001 16:01:03 +0900
Message-Id: < 200102020701.QAA10798@japaninc.net
<mailto:200102020701.QAA10798@japaninc.net>
>
To: maxim@j-door.com <mailto:maxim@j-door.com>
Subject: Message Body [Will be sent exactly as you see it in this box]:
FROM: "J-Door Newsletter" < newsletter@j-door.com
<mailto:newsletter@j-door.com> >
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
</snip>
It all looks alright to me, however in from field of my email client I still
see ' newsletter@j-door.com' <mailto:newsletter@j-door.com'> instead of
'J-Door Newsletter' ,
What am doing wrong?
Cheers,
Maxim Maletsky - maxim@j-door.com <mailto:maxim@j-door.com>
Webmaster, J-Door.com / J@pan Inc.
LINC Media, Inc.
TEL: 03-3499-2175 x 1271
FAX: 03-3499-3109
http://www.j-door.com <http://www.j-door.com/>
http://www.japaninc.net <http://www.japaninc.net/>
http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/>