<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Problem sending mail with PHP mail function</title>
	<atom:link href="http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/</link>
	<description>Experiments and thoughts in PHP and javascript</description>
	<lastBuildDate>Sat, 04 Sep 2010 10:02:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Foodie2</title>
		<link>http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/comment-page-1/#comment-1887</link>
		<dc:creator>Foodie2</dc:creator>
		<pubDate>Thu, 05 Aug 2010 13:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.commodi.com/?p=220#comment-1887</guid>
		<description>Thank you, Danny, this is just what I needed. 
The mismatch between $SendEmail and $Headers &quot;From&quot; was the cause of endless hours of fruitless testing, trying to get mail to go to a Yahoo address. Note that AOL didn&#039;t care.
I have now forced a match by saying:
&#039;$SendEmail =&quot;AnEmail@mydomain.co.uk&quot;;
$headers = &quot;From:&quot; . $SendEmail . &quot;\r\n&quot; .&#039;</description>
		<content:encoded><![CDATA[<p>Thank you, Danny, this is just what I needed.<br />
The mismatch between $SendEmail and $Headers &#8220;From&#8221; was the cause of endless hours of fruitless testing, trying to get mail to go to a Yahoo address. Note that AOL didn&#8217;t care.<br />
I have now forced a match by saying:<br />
&#8216;$SendEmail =&#8221;AnEmail@mydomain.co.uk&#8221;;<br />
$headers = &#8220;From:&#8221; . $SendEmail . &#8220;\r\n&#8221; .&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario</title>
		<link>http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/comment-page-1/#comment-1883</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Sat, 03 Jul 2010 20:38:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.commodi.com/?p=220#comment-1883</guid>
		<description>Thanks a lot. I have been looking for this very long. It works.</description>
		<content:encoded><![CDATA[<p>Thanks a lot. I have been looking for this very long. It works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: atsalycj</title>
		<link>http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/comment-page-1/#comment-1881</link>
		<dc:creator>atsalycj</dc:creator>
		<pubDate>Thu, 01 Jul 2010 01:58:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.commodi.com/?p=220#comment-1881</guid>
		<description>Hi,

i have been able to send email to my yahoo and gmail using the php mail script, but i don&#039;t know why it doesn&#039;t send to other domains like lycos.

help anyone? :(</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>i have been able to send email to my yahoo and gmail using the php mail script, but i don&#8217;t know why it doesn&#8217;t send to other domains like lycos.</p>
<p>help anyone? <img src='http://www.dotvoid.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mailtester</title>
		<link>http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/comment-page-1/#comment-1761</link>
		<dc:creator>mailtester</dc:creator>
		<pubDate>Thu, 01 Apr 2010 20:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.commodi.com/?p=220#comment-1761</guid>
		<description>Hi all,
 I see there are recent comments, so here is a solution to the problem: 
1. You are using a web hosting service, that includes Linux e-mail service. Just create an e-mail account on your server: 
youremail@yourdomain.com

2. in your php mailing script be sure to keep the following:
$MailHeader  = &quot;From: Just created this account on WEB \n&quot;;

NB: this solves your problem about sending emails from the localhost. If you want your e-mails not to be handled as SPAM, simply add a next line to the mail header which contains your email as Reply-to.

Best regards,
John S.</description>
		<content:encoded><![CDATA[<p>Hi all,<br />
 I see there are recent comments, so here is a solution to the problem:<br />
1. You are using a web hosting service, that includes Linux e-mail service. Just create an e-mail account on your server:<br />
<a href="mailto:youremail@yourdomain.com">youremail@yourdomain.com</a></p>
<p>2. in your php mailing script be sure to keep the following:<br />
$MailHeader  = &#8220;From: Just created this account on WEB \n&#8221;;</p>
<p>NB: this solves your problem about sending emails from the localhost. If you want your e-mails not to be handled as SPAM, simply add a next line to the mail header which contains your email as Reply-to.</p>
<p>Best regards,<br />
John S.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahesh</title>
		<link>http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/comment-page-1/#comment-1756</link>
		<dc:creator>Mahesh</dc:creator>
		<pubDate>Wed, 10 Mar 2010 09:22:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.commodi.com/?p=220#comment-1756</guid>
		<description>ini_set(&quot;SMTP&quot;, &quot;mail.domain.com&quot;);
ini_set(&quot;smtp_port&quot;, 25);

//ini_set(&quot;sendmail_from&quot;, &quot;info@domain.com&quot;);
Hi sir

I am using bellow code to send a mail, my client website is hosted on 
Windows IIS/6.0

I am not able to send a mail using this code

please give me a solution for this 

$mailTo	      = &quot;name@hotmail.com&quot;; //  Recipient email id

$subject = &#039;Test mail&#039;;	
$message = &#039;Test mail&#039;;	

$mailHeader	= &quot;Content-type: text/html; charset=iso-8859-1\r\n&quot;;			
$mailHeader	= $mailHeader . &quot;From: info@domain.com\r\n&quot;;
$mailHeader	= $mailHeader . &quot;BCC: name@gmail.com\r\n&quot;;

if(mail($mailTo, $subject, $message, $mailHeader)) {
	echo &quot;ok&quot;;
} else {
	echo &quot;error&quot;;
}


Thanks and regards

Mahesh</description>
		<content:encoded><![CDATA[<p>ini_set(&#8220;SMTP&#8221;, &#8220;mail.domain.com&#8221;);<br />
ini_set(&#8220;smtp_port&#8221;, 25);</p>
<p>//ini_set(&#8220;sendmail_from&#8221;, &#8220;info@domain.com&#8221;);<br />
Hi sir</p>
<p>I am using bellow code to send a mail, my client website is hosted on<br />
Windows IIS/6.0</p>
<p>I am not able to send a mail using this code</p>
<p>please give me a solution for this </p>
<p>$mailTo	      = &#8220;name@hotmail.com&#8221;; //  Recipient email id</p>
<p>$subject = &#8216;Test mail&#8217;;<br />
$message = &#8216;Test mail&#8217;;	</p>
<p>$mailHeader	= &#8220;Content-type: text/html; charset=iso-8859-1\r\n&#8221;;<br />
$mailHeader	= $mailHeader . &#8220;From: <a href="mailto:info@domain.com">info@domain.com</a>\r\n&#8221;;<br />
$mailHeader	= $mailHeader . &#8220;BCC: <a href="mailto:name@gmail.com">name@gmail.com</a>\r\n&#8221;;</p>
<p>if(mail($mailTo, $subject, $message, $mailHeader)) {<br />
	echo &#8220;ok&#8221;;<br />
} else {<br />
	echo &#8220;error&#8221;;<br />
}</p>
<p>Thanks and regards</p>
<p>Mahesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wdp</title>
		<link>http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/comment-page-1/#comment-1330</link>
		<dc:creator>wdp</dc:creator>
		<pubDate>Sat, 14 Nov 2009 07:40:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.commodi.com/?p=220#comment-1330</guid>
		<description>Hi,
 I m trying to send email from a web page using  PHP mail() function.

example: 
mail($to, $subject, $message, $from);

Mails are not received to its destination.

Please let me know the solution...

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
 I m trying to send email from a web page using  PHP mail() function.</p>
<p>example:<br />
mail($to, $subject, $message, $from);</p>
<p>Mails are not received to its destination.</p>
<p>Please let me know the solution&#8230;</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vineet</title>
		<link>http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/comment-page-1/#comment-1315</link>
		<dc:creator>vineet</dc:creator>
		<pubDate>Wed, 11 Nov 2009 16:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.commodi.com/?p=220#comment-1315</guid>
		<description>Hi,

We are trying to use similar code mentioned above in our php to send mail. We have done appropriate settings as well in php.ini file. mail() function is returning &#039;1&#039; but its not sending any mail neither throwing any error. 
For your reference here is the code of php file

 


ini file

[mail function]
; For Win32 only.
SMTP = 
smtp_port = 25

; For Win32 only.
sendmail_from = xxx@yyy.com

; For Unix only.  You may supply arguments as well (default: &quot;sendmail -t -i&quot;).
sendmail_path = /usr/sbin/sendmail


Can you please let me know what is the issue</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>We are trying to use similar code mentioned above in our php to send mail. We have done appropriate settings as well in php.ini file. mail() function is returning &#8216;1&#8242; but its not sending any mail neither throwing any error.<br />
For your reference here is the code of php file</p>
<p>ini file</p>
<p>[mail function]<br />
; For Win32 only.<br />
SMTP =<br />
smtp_port = 25</p>
<p>; For Win32 only.<br />
sendmail_from = <a href="mailto:xxx@yyy.com">xxx@yyy.com</a></p>
<p>; For Unix only.  You may supply arguments as well (default: &#8220;sendmail -t -i&#8221;).<br />
sendmail_path = /usr/sbin/sendmail</p>
<p>Can you please let me know what is the issue</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wachiuri</title>
		<link>http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/comment-page-1/#comment-1012</link>
		<dc:creator>wachiuri</dc:creator>
		<pubDate>Thu, 17 Sep 2009 12:25:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.commodi.com/?p=220#comment-1012</guid>
		<description>i have the same problem. i used the mail function on my computer that had XMail. so i sent to an account on my ;local computer. it sent the email just fine. the problem occurred when i try sending to other remote emails e.g yahoo and gmail.any body found the solution.</description>
		<content:encoded><![CDATA[<p>i have the same problem. i used the mail function on my computer that had XMail. so i sent to an account on my ;local computer. it sent the email just fine. the problem occurred when i try sending to other remote emails e.g yahoo and gmail.any body found the solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/comment-page-1/#comment-937</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Fri, 21 Aug 2009 18:14:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.commodi.com/?p=220#comment-937</guid>
		<description>PJ,

Have you found a solution yet? I have the exact same problem. 

I am using the Mail() function and trying to send mail out from my code. For example order confirmation code, online lead etc.

Typically some destinations work. Some don&#039;t. Comcast emails addresses do not work. Yahoo almost always disappears. Gmail is ok.

How to solve this. Adding my from address to the whitelist does not seem to solve the problem. Or will it?

thanks</description>
		<content:encoded><![CDATA[<p>PJ,</p>
<p>Have you found a solution yet? I have the exact same problem. </p>
<p>I am using the Mail() function and trying to send mail out from my code. For example order confirmation code, online lead etc.</p>
<p>Typically some destinations work. Some don&#8217;t. Comcast emails addresses do not work. Yahoo almost always disappears. Gmail is ok.</p>
<p>How to solve this. Adding my from address to the whitelist does not seem to solve the problem. Or will it?</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: duckranger.com - Emails Not Sent? - Post Notification and WP-MAIL-SMTP Configuration</title>
		<link>http://www.dotvoid.com/2007/04/problem-sending-mail-with-php-mail-function/comment-page-1/#comment-726</link>
		<dc:creator>duckranger.com - Emails Not Sent? - Post Notification and WP-MAIL-SMTP Configuration</dc:creator>
		<pubDate>Mon, 15 Jun 2009 22:25:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.commodi.com/?p=220#comment-726</guid>
		<description>[...] web hosting companies do not have the right configuration for php mail. There may not always be a simple solution, and this can be quite frustrating. But what [...]</description>
		<content:encoded><![CDATA[<p>[...] web hosting companies do not have the right configuration for php mail. There may not always be a simple solution, and this can be quite frustrating. But what [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
