<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1-alpha-2539" -->
<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"
		>
	<channel>
		<title>WordPress.com Forums &#187; Topic: How I Can Use PHP To &quot;Post By Email&quot;</title>
		<link>http://en.forums.wordpress.com/topic/how-i-can-use-php-to-post-by-email</link>
		<description>WordPress.com Forums &#187; Topic: How I Can Use PHP To &quot;Post By Email&quot;</description>
		<language>en</language>
		<pubDate>Thu, 23 May 2013 10:52:53 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1-alpha-2539</generator>
				<atom:link href="http://en.forums.wordpress.com/rss/topic/how-i-can-use-php-to-post-by-email" rel="self" type="application/rss+xml" />

		<item>
			<title>macmanx on "How I Can Use PHP To &quot;Post By Email&quot;"</title>
			<link>http://en.forums.wordpress.com/topic/how-i-can-use-php-to-post-by-email#post-675642</link>
			<pubDate>Fri, 19 Aug 2011 19:21:26 +0000</pubDate>
			<dc:creator>macmanx</dc:creator>
			<guid isPermaLink="false">675642@http://en.forums.wordpress.com/</guid>
			<description><![CDATA[<p>We filter out these sort of requests as they can easily be abused by spammers.</p>
<p>The emails must come from an actually email or webmail client.
</p>
]]></description>
					</item>
		<item>
			<title>justanimal on "How I Can Use PHP To &quot;Post By Email&quot;"</title>
			<link>http://en.forums.wordpress.com/topic/how-i-can-use-php-to-post-by-email#post-675441</link>
			<pubDate>Fri, 19 Aug 2011 14:27:15 +0000</pubDate>
			<dc:creator>justanimal</dc:creator>
			<guid isPermaLink="false">675441@http://en.forums.wordpress.com/</guid>
			<description><![CDATA[<p>my gmail can receive email,but wordpress blog can't receive the email.i not sure whether wordpress have some limited?
</p>
]]></description>
					</item>
		<item>
			<title>justanimal on "How I Can Use PHP To &quot;Post By Email&quot;"</title>
			<link>http://en.forums.wordpress.com/topic/how-i-can-use-php-to-post-by-email#post-675424</link>
			<pubDate>Fri, 19 Aug 2011 14:11:21 +0000</pubDate>
			<dc:creator>justanimal</dc:creator>
			<guid isPermaLink="false">675424@http://en.forums.wordpress.com/</guid>
			<description><![CDATA[<p>i try the wp-mail can still failed</p>
<p>error_reporting(E_ALL);<br />
	require_once(dirname(__FILE__) . '/../../../wp-config.php');<br />
	require_once(ABSPATH.'/wp-admin/includes/taxonomy.php');<br />
    require_once(ABSPATH.'/wp-includes/pluggable.php');</p>
<p>	nocache_headers();<br />
	global $wpdb;<br />
	$headers .= "Date: ". date("D, j M Y H:i:s")."\n"; //date;<br />
$headers .= "From: &#60;[email redacted]&#62;\n"; // your mail<br />
$headers .= "To: \"blog\" &#60;[email redacted]&#62;\n"; // mail to post<br />
$headers .= "Content-Type: text/plain; charset=UTF8; format=flowed \n" ; // you can change ISO-8859-1 to UTF8<br />
$headers .= "Content-Transfer-Encoding: 8bit\n";<br />
$param = "-f &#60;[email redacted]&#62;"; // your mail<br />
	wp_mail( "[email redacted]", "this is a test", "can you help me?",$headers,$param);
</p>
]]></description>
					</item>
		<item>
			<title>justanimal on "How I Can Use PHP To &quot;Post By Email&quot;"</title>
			<link>http://en.forums.wordpress.com/topic/how-i-can-use-php-to-post-by-email#post-675416</link>
			<pubDate>Fri, 19 Aug 2011 13:58:35 +0000</pubDate>
			<dc:creator>justanimal</dc:creator>
			<guid isPermaLink="false">675416@http://en.forums.wordpress.com/</guid>
			<description><![CDATA[<p>i want use "Post by Email" feature,but have some problems,my blog can't reveive email!<br />
at first i use phpmailer,and here is the code:</p>
<p>require_once('./class-phpmailer.php');<br />
$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch<br />
$mail-&#62;IsSMTP(); // telling the class to use SMTP</p>
<p>try {<br />
  $mail-&#62;Host       = "pop.gmail.com"; // SMTP server<br />
  $mail-&#62;SMTPDebug  = 2;                     // enables SMTP debug information (for testing)<br />
  $mail-&#62;SMTPAuth   = true;                  // enable SMTP authentication<br />
  $mail-&#62;SMTPSecure = "ssl";                 // sets the prefix to the servier<br />
  $mail-&#62;Host       = "smtp.gmail.com";      // sets GMAIL as the SMTP server<br />
  $mail-&#62;Port       = 465;                   // set the SMTP port for the GMAIL server<br />
  $mail-&#62;Username   = "[email redacted]";  // GMAIL username<br />
  $mail-&#62;Password   = "mypwd";            // GMAIL password</p>
<p>// $mail-&#62;AddAddress("[email redacted]","justanimal");<br />
//$mail-&#62;AddBCC("[email redacted]","justanimal");<br />
  $mail-&#62;AddAddress("[email redacted]","xiehua");<br />
//$mail-&#62;AddAddress("[email redacted]","xiehua");<br />
 $mail-&#62;SetFrom('[email redacted]',"xiehua");<br />
 $mail-&#62;AddReplyTo('[email redacted]', 'xiehua');<br />
  $mail-&#62;Subject = 'hello';<br />
  $mail-&#62;MsgHTML("[title hello] [tags hello,animals] helloworld");<br />
  $mail-&#62;Send();<br />
  echo "Message Sent OK&#60;/p&#62;\n";<br />
} catch (phpmailerException $e) {<br />
  echo $e-&#62;errorMessage(); //Pretty error messages from PHPMailer<br />
} catch (Exception $e) {<br />
  echo $e-&#62;getMessage(); //Boring error messages from anything else!<br />
}</p>
<p>i try<br />
1.  send to my gmail and wordpress blog , blog can't receive email<br />
2. send to my gmail and cc to wordpress blog, blog can't receive email<br />
3. send to my gmail and bcc to wordpress blog, blog can't receive email.<br />
4. send to wordpress blog, blog can't receive email.</p>
<p>and then i try mail() function. and i change the header,also can't receive email<br />
code is here</p>
<p>$headers .= "Date: ". date("D, j M Y H:i:s")."\n"; //date;<br />
$headers .= "From: &#60;[email redacted]&#62;\n"; // your mail<br />
$headers .= "To: \"blog\" &#60;[email redacted]&#62;\n"; // mail to post<br />
$headers .= "Content-Type: text/plain; charset=UTF8; format=flowed \n" ; </p>
<p>$headers .= "Content-Transfer-Encoding: 8bit\n";<br />
$param = "-f &#60;[email redacted]&#62;"; // your mail<br />
	mail ("[email redacted]", "this is a test" , "can you help me?",$headers,$param);</p>
<p>this also can't receive email!<br />
but if i use gmail or outlook ,the wordpress blog can receive email!<br />
can you help me?<br />
Blog url: <a href='http://justanimal.wordpress.com/'>http://justanimal.wordpress.com/</a>
</p>
]]></description>
					</item>

	</channel>
</rss>
