<?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: Scraping Gmail IMAP Messages to MySQL Database</title>
	<atom:link href="http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database/feed" rel="self" type="application/rss+xml" />
	<link>http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database</link>
	<description>Research &#38; Development at Limina.Studio</description>
	<lastBuildDate>Sun, 05 Feb 2012 14:48:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jason</title>
		<link>http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database/comment-page-1#comment-11146</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 27 May 2011 01:27:29 +0000</pubDate>
		<guid isPermaLink="false">http://log.liminastudio.com/?p=308#comment-11146</guid>
		<description>I&#039;m am not able to to get this to completely work.  I am able to the checkmail code, and it&#039;ll show that there is 103 messages.  But when I run the dumptodb, total messages isn&#039;t being populated and nothing is being entered into the db.  I&#039;ve trailed through the code and I can&#039;t figure out why this isn&#039;t working.  The checkmail seems to connect alright, but something about the dump isn&#039;t seeing the msgs.  Any hints?</description>
		<content:encoded><![CDATA[<p>I&#8217;m am not able to to get this to completely work.  I am able to the checkmail code, and it&#8217;ll show that there is 103 messages.  But when I run the dumptodb, total messages isn&#8217;t being populated and nothing is being entered into the db.  I&#8217;ve trailed through the code and I can&#8217;t figure out why this isn&#8217;t working.  The checkmail seems to connect alright, but something about the dump isn&#8217;t seeing the msgs.  Any hints?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database/comment-page-1#comment-10839</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Wed, 13 Apr 2011 18:01:11 +0000</pubDate>
		<guid isPermaLink="false">http://log.liminastudio.com/?p=308#comment-10839</guid>
		<description>This is some great code and may just save me a ton or work.
Couple questions though.. 

Are the 2  scripts, check_mail.php and dump_to_db.php meant to be independant of one another?   I am finding that the dump_to_db.php script seems to do pretty much what i am looking for with exception to truncating the database each time... I want to modify the code to only pull in &quot;new&quot; or &quot;unread&quot; messages... and just leave the rest of the database in tact... anyone know if this is easily doable?  This way, i could cron the script to run every 5 minutes or so to pull the most recent messages if any.

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>This is some great code and may just save me a ton or work.<br />
Couple questions though.. </p>
<p>Are the 2  scripts, check_mail.php and dump_to_db.php meant to be independant of one another?   I am finding that the dump_to_db.php script seems to do pretty much what i am looking for with exception to truncating the database each time&#8230; I want to modify the code to only pull in &#8220;new&#8221; or &#8220;unread&#8221; messages&#8230; and just leave the rest of the database in tact&#8230; anyone know if this is easily doable?  This way, i could cron the script to run every 5 minutes or so to pull the most recent messages if any.</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerry</title>
		<link>http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database/comment-page-1#comment-10225</link>
		<dc:creator>Kerry</dc:creator>
		<pubDate>Sat, 18 Dec 2010 12:19:19 +0000</pubDate>
		<guid isPermaLink="false">http://log.liminastudio.com/?p=308#comment-10225</guid>
		<description>Brilliant!!!!!!!!! I spent hours searching the net ......... Slight issue with $to names... in class change the following:

if(is_array($to)){
foreach ($from as $id =&gt; $object) {
                $toaddress = $object-&gt;mailbox . &quot;@&quot; . $object-&gt;host;
	}
}

to be:

if(is_array($to)){
foreach ($to as $id =&gt; $object) {
                 $toname = $object-&gt;personal;
                $toaddress = $object-&gt;mailbox . &quot;@&quot; . $object-&gt;host;
	}
}


else the FROM address ends up in the database!

also add:
	$email[&#039;TO_NAME&#039;]  = $this-&gt;mime_text_decode($toname);

And you have to add another column into the database of EmailToP

Then you can store the name of the To...

I am modifying this class to differentiate between my INBOX and SENT items...

I originally had a lookup happening using calls to IMAP but now in MYSQL its 10x faster!!!!

Just have to sort out my select queries!

Thanks again for this great bit of code....</description>
		<content:encoded><![CDATA[<p>Brilliant!!!!!!!!! I spent hours searching the net &#8230;&#8230;&#8230; Slight issue with $to names&#8230; in class change the following:</p>
<p>if(is_array($to)){<br />
foreach ($from as $id =&gt; $object) {<br />
                $toaddress = $object-&gt;mailbox . &#8220;@&#8221; . $object-&gt;host;<br />
	}<br />
}</p>
<p>to be:</p>
<p>if(is_array($to)){<br />
foreach ($to as $id =&gt; $object) {<br />
                 $toname = $object-&gt;personal;<br />
                $toaddress = $object-&gt;mailbox . &#8220;@&#8221; . $object-&gt;host;<br />
	}<br />
}</p>
<p>else the FROM address ends up in the database!</p>
<p>also add:<br />
	$email['TO_NAME']  = $this-&gt;mime_text_decode($toname);</p>
<p>And you have to add another column into the database of EmailToP</p>
<p>Then you can store the name of the To&#8230;</p>
<p>I am modifying this class to differentiate between my INBOX and SENT items&#8230;</p>
<p>I originally had a lookup happening using calls to IMAP but now in MYSQL its 10x faster!!!!</p>
<p>Just have to sort out my select queries!</p>
<p>Thanks again for this great bit of code&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt frank</title>
		<link>http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database/comment-page-1#comment-10042</link>
		<dc:creator>matt frank</dc:creator>
		<pubDate>Thu, 23 Sep 2010 17:48:03 +0000</pubDate>
		<guid isPermaLink="false">http://log.liminastudio.com/?p=308#comment-10042</guid>
		<description>great script one problem i found is it add email from and email to as the same address in the db even though it&#039;s not. looking through script to see if i can fix but hopefully you can reply and tell me where to look</description>
		<content:encoded><![CDATA[<p>great script one problem i found is it add email from and email to as the same address in the db even though it&#8217;s not. looking through script to see if i can fix but hopefully you can reply and tell me where to look</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database/comment-page-1#comment-9702</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Thu, 13 May 2010 19:26:29 +0000</pubDate>
		<guid isPermaLink="false">http://log.liminastudio.com/?p=308#comment-9702</guid>
		<description>Hi I am using your class but i am having problems with the attachments, if there is only one mail the attach downloads successfully but if there are more than one mail the attachments are not download. Do you know what can be wrong?
Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi I am using your class but i am having problems with the attachments, if there is only one mail the attach downloads successfully but if there are more than one mail the attachments are not download. Do you know what can be wrong?<br />
Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron</title>
		<link>http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database/comment-page-1#comment-9533</link>
		<dc:creator>Ron</dc:creator>
		<pubDate>Wed, 14 Apr 2010 14:14:58 +0000</pubDate>
		<guid isPermaLink="false">http://log.liminastudio.com/?p=308#comment-9533</guid>
		<description>I am new at this and am wondering.  Where is this installed?  How does this start up besides with the click of a button?  I noticed the last entry was 11/2009.
Have you moved beyond this?</description>
		<content:encoded><![CDATA[<p>I am new at this and am wondering.  Where is this installed?  How does this start up besides with the click of a button?  I noticed the last entry was 11/2009.<br />
Have you moved beyond this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tedb0t</title>
		<link>http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database/comment-page-1#comment-8287</link>
		<dc:creator>Tedb0t</dc:creator>
		<pubDate>Tue, 01 Dec 2009 01:52:21 +0000</pubDate>
		<guid isPermaLink="false">http://log.liminastudio.com/?p=308#comment-8287</guid>
		<description>Hm, not sure, I haven&#039;t tried to do any deleting...</description>
		<content:encoded><![CDATA[<p>Hm, not sure, I haven&#8217;t tried to do any deleting&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database/comment-page-1#comment-8286</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 01 Dec 2009 01:30:55 +0000</pubDate>
		<guid isPermaLink="false">http://log.liminastudio.com/?p=308#comment-8286</guid>
		<description>This is a great improvement over the original. One thing I can&#039;t figure out though - how to get the delete to work. Basically I&#039;m just trying to dump the inbox into a db and delete the messages. Can&#039;t get it to work using gmail or another imap server. Any ideas?</description>
		<content:encoded><![CDATA[<p>This is a great improvement over the original. One thing I can&#8217;t figure out though &#8211; how to get the delete to work. Basically I&#8217;m just trying to dump the inbox into a db and delete the messages. Can&#8217;t get it to work using gmail or another imap server. Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tedb0t</title>
		<link>http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database/comment-page-1#comment-7541</link>
		<dc:creator>Tedb0t</dc:creator>
		<pubDate>Tue, 18 Aug 2009 17:03:15 +0000</pubDate>
		<guid isPermaLink="false">http://log.liminastudio.com/?p=308#comment-7541</guid>
		<description>You need to make a /files/email directory in the emailtodb directory, if you haven&#039;t done that, and it should be writable and readable by the http server.  Probably easiest to just make it 777.</description>
		<content:encoded><![CDATA[<p>You need to make a /files/email directory in the emailtodb directory, if you haven&#8217;t done that, and it should be writable and readable by the http server.  Probably easiest to just make it 777.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frankel</title>
		<link>http://log.liminastudio.com/itp/scraping-gmail-imap-messages-to-mysql-database/comment-page-1#comment-7540</link>
		<dc:creator>Frankel</dc:creator>
		<pubDate>Tue, 18 Aug 2009 16:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://log.liminastudio.com/?p=308#comment-7540</guid>
		<description>Hi Ted,
Thanks for posting this and making sense of the emailtodb class. I seem to be having trouble with attachments. I get this warning and thought you might point me in the right direction:
-----
Warning: mkdir() [function.mkdir]: No such file or directory in /home/.lacerations/userme/domain.com/emailtodb/class.emailtodb_tedb0t.php on line 665
*Multipart* making path
-----
Thanks!</description>
		<content:encoded><![CDATA[<p>Hi Ted,<br />
Thanks for posting this and making sense of the emailtodb class. I seem to be having trouble with attachments. I get this warning and thought you might point me in the right direction:<br />
&#8212;&#8211;<br />
Warning: mkdir() [function.mkdir]: No such file or directory in /home/.lacerations/userme/domain.com/emailtodb/class.emailtodb_tedb0t.php on line 665<br />
*Multipart* making path<br />
&#8212;&#8211;<br />
Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

