NYCPHP Meetup

NYPHP.org

[nycphp-talk] Botched email header

Jeff jsiegel1 at optonline.net
Thu Jul 24 11:23:10 EDT 2003


Below is the header from a "botched" email (see the "FROM" line) and
below that is a snippet of code used to generate the header. Notice that
the second part of the "From" in the header has the correct email
address as does the Reply-To section of the header. It's probably the
apostrophe that's messing things up but I'm wondering what's the best
way to handle this. It should be noted (in case it is relevant to the
solution) that:
	a. magic_quotes is on (yes...I'm aware of the problems it
causes).
	b. the headers (along with the message body) get "bundled" into
an array, then get serialized and sent to another function which shoots
out the email.
	c. The FROM line *should* have said "From: Jay's Auto Wrecking
<mike at jaysauto.com>"

-Jeff
========================================================================

"ABNORMAL" headers:
From: Jay's.Auto.Wrecking at server1.uneedapart.com, "Inc."
<mike at jaysauto.com>
Reply-To: <mike at jaysauto.com>
X-Sender: <mike at jaysauto.com>
X-Mailer: PHP4
X-Priority: 1
Status:   
MIME-Version: 1.0


Code Snippet:

$sHeaders = "From: $sCompanyName
<{$_SESSION['srDU_sLoginEMailAddr']}>\n"
						."Reply-To:
<{$_SESSION['srDU_sLoginEMailAddr']}>\n"
						."X-Sender:
<{$_SESSION['srDU_sLoginEMailAddr']}>\n"
						."X-Mailer: PHP4\n"
						."X-Priority: 1\n"
						."Return-Path:
<{$_SESSION['srDU_sLoginEMailAddr']}>\n";





More information about the talk mailing list