<?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: How to Send Email from a PHP Script Using SMTP Authentication</title>
	<atom:link href="http://tech-stuff.org/how-to-send-email-from-a-php-script-using-smtp-authentication/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech-stuff.org/how-to-send-email-from-a-php-script-using-smtp-authentication/</link>
	<description>Hosting Tips &#38; Tricks</description>
	<lastBuildDate>Sun, 11 Dec 2011 18:33:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: admin</title>
		<link>http://tech-stuff.org/how-to-send-email-from-a-php-script-using-smtp-authentication/comment-page-1/#comment-212</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 07 Dec 2010 08:16:31 +0000</pubDate>
		<guid isPermaLink="false">http://tech-stuff.org/?p=112#comment-212</guid>
		<description>Sorry for the late answer . If it still helps you have to setup &quot;Content-type&quot; in header section bellow &quot;$headers = array (...&quot; line .
e.g.:


$headers = array (‘From’ =&gt; $from,
‘To’ =&gt; $to,
‘Subject’ =&gt; $subject);
);
    array_push(&amp;$headers, &#039;MIME-Version: 1.0&#039;);
    array_push(&amp;$headers, &#039;Content-Type: multipart/mixed;&#039;);

    array_push(&amp;$headers, &quot; boundary=\&quot;{$mime_boundary}\&quot;&quot;);</description>
		<content:encoded><![CDATA[<p>Sorry for the late answer . If it still helps you have to setup &#8220;Content-type&#8221; in header section bellow &#8220;$headers = array (&#8230;&#8221; line .<br />
e.g.:</p>
<p>$headers = array (‘From’ =&gt; $from,<br />
‘To’ =&gt; $to,<br />
‘Subject’ =&gt; $subject);<br />
);<br />
    array_push(&amp;$headers, &#8216;MIME-Version: 1.0&#8242;);<br />
    array_push(&amp;$headers, &#8216;Content-Type: multipart/mixed;&#8217;);</p>
<p>    array_push(&amp;$headers, &#8221; boundary=\&#8221;{$mime_boundary}\&#8221;");</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://tech-stuff.org/how-to-send-email-from-a-php-script-using-smtp-authentication/comment-page-1/#comment-208</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 04 Nov 2010 07:29:39 +0000</pubDate>
		<guid isPermaLink="false">http://tech-stuff.org/?p=112#comment-208</guid>
		<description>Please help me
I want to know how to add 
MIME-Version: 1.0 

and 

Content-type: text/html; charset=iso-8859-1 

in mentioned bwlow code




&lt;?php
    require_once “Mail.php”;

    $from = “Sandra Sender ”;
    $to = “Ramona Recipient ”;
    $subject = “Hi!”;
    $body = “Hi,\n\nHow are you?”;

    $host = “mail.example.com”;
    $username = “smtp_username”;
    $password = “smtp_password”;

    $headers = array (‘From’ =&gt; $from,
    ‘To’ =&gt; $to,
    ‘Subject’ =&gt; $subject);
    $smtp = Mail::factory(‘smtp’,
    array (‘host’ =&gt; $host,
    ‘auth’ =&gt; true,
    ‘username’ =&gt; $username,
    ‘password’ =&gt; $password));

    $mail = $smtp-&gt;send($to, $headers, $body);

    if (PEAR::isError($mail)) {
    echo(“” . $mail-&gt;getMessage() . “”);
    } else {
    echo(“Message successfully sent!”);
    }
    ?&gt;</description>
		<content:encoded><![CDATA[<p>Please help me<br />
I want to know how to add<br />
MIME-Version: 1.0 </p>
<p>and </p>
<p>Content-type: text/html; charset=iso-8859-1 </p>
<p>in mentioned bwlow code</p>
<p>&lt;?php<br />
    require_once “Mail.php”;</p>
<p>    $from = “Sandra Sender ”;<br />
    $to = “Ramona Recipient ”;<br />
    $subject = “Hi!”;<br />
    $body = “Hi,\n\nHow are you?”;</p>
<p>    $host = “mail.example.com”;<br />
    $username = “smtp_username”;<br />
    $password = “smtp_password”;</p>
<p>    $headers = array (‘From’ =&gt; $from,<br />
    ‘To’ =&gt; $to,<br />
    ‘Subject’ =&gt; $subject);<br />
    $smtp = Mail::factory(‘smtp’,<br />
    array (‘host’ =&gt; $host,<br />
    ‘auth’ =&gt; true,<br />
    ‘username’ =&gt; $username,<br />
    ‘password’ =&gt; $password));</p>
<p>    $mail = $smtp-&gt;send($to, $headers, $body);</p>
<p>    if (PEAR::isError($mail)) {<br />
    echo(“” . $mail-&gt;getMessage() . “”);<br />
    } else {<br />
    echo(“Message successfully sent!”);<br />
    }<br />
    ?&gt;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/18 queries in 0.009 seconds using disk: basic
Object Caching 198/199 objects using disk: basic

Served from: tech-stuff.org @ 2012-02-05 23:23:37 -->
