NYCPHP Meetup

NYPHP.org

[nycphp-talk] Botched email header

evcoen at earthlink.net evcoen at earthlink.net
Thu Jul 24 11:44:23 EDT 2003


I believe this will always happen with the code you list, if there's an
apostrophe in the company name. Before assigning a value to $companyName
you might try parsing the string: either stripping apostrophes or by
marking them as literal text.

-evc

Original Message:
-----------------
From: Jeff jsiegel1 at optonline.net
Date: Thu, 24 Jul 2003 11:23:10 -0400
To: talk at lists.nyphp.org
Subject: [nycphp-talk] Botched email header


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";


_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .





More information about the talk mailing list