<?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>The Dangly Bits &#187; phpgmailer</title>
	<atom:link href="http://www.thedanglybits.com/category/phpgmailer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thedanglybits.com</link>
	<description>Taking the IE out of danglie</description>
	<lastBuildDate>Tue, 21 Jul 2009 19:54:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>UPDATE: Send email with PHP and GMail hosted for your domain</title>
		<link>http://www.thedanglybits.com/2006/10/13/update-send-email-with-php-and-gmail-hosted-for-your-domain/</link>
		<comments>http://www.thedanglybits.com/2006/10/13/update-send-email-with-php-and-gmail-hosted-for-your-domain/#comments</comments>
		<pubDate>Sat, 14 Oct 2006 04:47:50 +0000</pubDate>
		<dc:creator>VulgarisOverIP</dc:creator>
				<category><![CDATA[GMail]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpgmailer]]></category>

		<guid isPermaLink="false">http://www.vulgarisoip.com/?p=17</guid>
		<description><![CDATA[Due to the amount of requests emailed to me for working source code I have now posted the modified PHPMailer I use in my own projects. Click here to download the library. Here&#8217;s an example of how to use the code:
require_once('/phpgmailer/class.phpgmailer.php');
$mail = new PHPGMailer();
$mail-&#62;Username = 'user@domain.com'; 
$mail-&#62;Password = 'password';
$mail-&#62;From = 'user@domain.com'; 
$mail-&#62;FromName = 'User Name';
$mail-&#62;Subject [...]]]></description>
			<content:encoded><![CDATA[<p>Due to the amount of requests emailed to me for working source code I have now posted the modified <a href="http://phpmailer.sourceforge.net/">PHPMailer</a> I use in my own projects. <a href="http://www.vulgarisoip.com/files/phpgmailer.zip">Click here</a> to download the library. Here&#8217;s an example of how to use the code:</p>
<p><code>require_once('/phpgmailer/class.phpgmailer.php');</code><br />
<code>$mail = new PHPGMailer();</code><br />
<code>$mail-&gt;Username = 'user@domain.com'; </code><br />
<code>$mail-&gt;Password = 'password';</code><br />
<code>$mail-&gt;From = 'user@domain.com'; </code><br />
<code>$mail-&gt;FromName = 'User Name';</code><br />
<code>$mail-&gt;Subject = 'Subject';</code><br />
<code>$mail-&gt;AddAddress('myfriend@domain.com');</code><br />
<code>$mail-&gt;Body = 'Hey buddy, here's an email!';</code><br />
<code>$mail-&gt;Send();</code></p>
<p>This will work for any GMail or <a href="http://www.google.com/hosted">Google Hosted</a> email account. Just make sure to include the @domain.com part for the username, even if it&#8217;s for standard GMail. Hope this saves people some hastle.</p>
<p>[tags]gmail, php, google, phpmailer[/tags]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2006/10/13/update-send-email-with-php-and-gmail-hosted-for-your-domain/feed/</wfw:commentRss>
		<slash:comments>93</slash:comments>
		</item>
		<item>
		<title>Send email with PHP and GMail hosted for your domain</title>
		<link>http://www.thedanglybits.com/2006/03/27/send-email-with-php-and-gmail-hosted-for-your-domain/</link>
		<comments>http://www.thedanglybits.com/2006/03/27/send-email-with-php-and-gmail-hosted-for-your-domain/#comments</comments>
		<pubDate>Mon, 27 Mar 2006 21:57:33 +0000</pubDate>
		<dc:creator>VulgarisOverIP</dc:creator>
				<category><![CDATA[GMail]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpgmailer]]></category>

		<guid isPermaLink="false">http://www.vulgarisoip.com/?p=14</guid>
		<description><![CDATA[I&#8217;ve been using Linux ever since I became a CS major at Georgia Tech five years ago. I&#8217;ve compiled my own kernels, maintained Apache and MySQL, and written custom IPTable&#8217;s; I&#8217;ve even setup printing AND scanning with modern hardware. But not once have I ever come close to setting up a working mail server.
On second [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Linux ever since I became a CS major at Georgia Tech five years ago. I&#8217;ve compiled my own kernels, maintained Apache and MySQL, and written custom IPTable&#8217;s; I&#8217;ve even setup printing AND scanning with modern hardware. But not once have I ever come close to setting up a working mail server.</p>
<p>On second though, I think I may have come close once. I sent out an email to myself and then sat there at my GMail inbox hitting refresh, waiting to receive the message. About five minutes later I found it in the spam folder and started reading about reverse IP pointers and DomainKeys. My brain started to hurt and in the end, I was sending messages through godaddy.com&#8217;s email servers and hoping most of my customers got their emails.</p>
<p>Now that GMail for your domain has arrived (if you&#8217;re a lucky beta winner, that is) it&#8217;s like hiring a world-class email server engineer and paying them nothing. It takes a little work because of GMail&#8217;s security requirements, but you end up with a rock solid email server that won&#8217;t send messages straight into spam folders.</p>
<p>First, download the standard <a href="http://phpmailer.sourceforge.net/">PHPMailer</a> libraries (version 1.73). The only thing you have to modify is the class.smtp.php file. Open it and go down to about line 683, in the <em>Quit() </em>member function. Comment out everything between the <em>fputs()</em> that sends the &#8220;quit&#8221; command and the <em>if</em> statement surrounding <em>$this-&gt;Close()</em> <strong>except</strong> for  <em>$rval = true;</em>. The reason this works is unknown to me, but every time I tried to read from the socket after sending the &#8220;quit&#8221; command I got a lot of garbage.</p>
<p>Now just use the following settings:</p>
<p><code>$mail-&gt;From = '***@&amp;&amp;&amp;.com';</code><br />
<code>$mail-&gt;Mailer = 'smtp';</code><br />
<code>$mail-&gt;Host = 'ssl://smtp.gmail.com';</code><br />
<code>$mail-&gt;Port = 465;</code><br />
<code>$mail-&gt;SMTPAuth = true;</code><br />
<code>$mail-&gt;Username = '***@&amp;&amp;&amp;.com';</code><br />
<code>$mail-&gt;Password = '***';</code></p>
<p>Replace the *&#8217;s and &amp;&#8217;s for real values and you&#8217;re all set.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2006/03/27/send-email-with-php-and-gmail-hosted-for-your-domain/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>
