<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Problem Shared . . . &#187; PHP mail</title>
	<atom:link href="http://www.moorlandit.net/index.php/tag/php-mail/feed" rel="self" type="application/rss+xml" />
	<link>http://www.moorlandit.net</link>
	<description>A blog of problems . . . and solutions</description>
	<lastBuildDate>Thu, 19 Aug 2010 15:18:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PHP Mail() Function Problem on Windows Server</title>
		<link>http://www.moorlandit.net/index.php/2009/01/php-mail-function-problem-on-windows-server-86?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=php-mail-function-problem-on-windows-server</link>
		<comments>http://www.moorlandit.net/index.php/2009/01/php-mail-function-problem-on-windows-server-86#comments</comments>
		<pubDate>Wed, 14 Jan 2009 16:12:46 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP mail]]></category>

		<guid isPermaLink="false">http://www.moorlandit.net/?p=86</guid>
		<description><![CDATA[We recently had a problem trying to send email using the PHP Mail function on Windows 2003 Server. When we tried to send mail we just got an error message: PHP Warning: mail(): SMTP server response: 501 5.5.4 Invalid Address We were trying to add a &#8216;friendly&#8217;  name to the from header of the email in [...]]]></description>
			<content:encoded><![CDATA[<p>We recently had a problem trying to send email using the PHP Mail function on Windows 2003 Server. When we tried to send mail we just got an error message:</p>
<p style="padding-left: 30px;">PHP Warning: mail(): SMTP server response: 501 5.5.4 Invalid Address</p>
<p>We were trying to add a &#8216;friendly&#8217;  name to the from header of the email in the format: </p>
<p style="padding-left: 30px;">$headers .= &#8216;From:  Name &lt;address@domain.com&gt;&#8217;. &#8220;\r\n&#8221;;</p>
<p>We found that PHP running on Windows doesn&#8217;t parse these headers correctly (see <a href="http://www.php.net/manual/en/function.mail.php">http://www.php.net/manual/en/function.mail.php</a> ) so the fix was to change to:</p>
<p style="padding-left: 30px;">$headers .= &#8216;From:  address@domain.com&#8217;. &#8220;\r\n&#8221;;</p>
<p>Which gets the mail to send but doesn&#8217;t allow us to use &#8216;friendly&#8217; names.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moorlandit.net/index.php/2009/01/php-mail-function-problem-on-windows-server-86/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
