« Upgraded to b2evolution 2.4.2Welcome to my new blog location »

email to b2evolution

04/27/08

  11:49:06 pm, by The Dreamer   , 195 words  
Categories: Software

email to b2evolution

Once again some quick PHP hacking to get this to work:

PHP

--- getmail.php.dist    Sun Apr 27 23:40:39 2008
+++ getmail.php    Sun Apr 27 23:43:40 2008
@@ -18,+18,@@
 require_once dirname(__FILE__).'/../conf/_config.php';
 
 require_once $inc_path.'_main.inc.php';
+require_once $inc_path.'items/model/_itemlist.class.php';
 
 if( !$Settings->get('eblog_enabled') )
 {
@@ -200,+201,10 @@
                             }
                         }
                         $ddate_U mktime($ddate_H$ddate_i$ddate_s$ddate_m$ddate_d$ddate_Y);
+                        $ddate_U $ddate_U 3600;
+                        $ar localtime($ddate_U,true);
+                        if ($ar['tm_isdst']) { $ddate_U 3600; }
+                        $ddate_U $ddate_U date('Z');
                         $post_date date('Y-m-d H:i:s'$ddate_U);
                     }
                 }
@@ -368,+373,@@
 
         $pop3->quit();
 
-        timer_stop($output_debugging_info);
+        #timer_stop($output_debugging_info);
         exit;
 
     break;

The first and last diff, I had to find from browsing the forums, the last bit I took from my 0.9.2 hacked version....to make the time stamp valid. The 2 * 3600, is hard coding the time offset between local time and server time....

What isn't present in the diff, is that I don't use usename:password or subject prefix....I simply trust that email coming a certain addresses correspond to a given user. So, far it has worked.

No feedback yet

Now instead of subjecting some poor random forum to a long rambling thought, I will try to consolidate those things into this blog where they can be more easily ignored profess to be collected thoughts from my mind.

Latest Poopli Updaters -- http://lkc.me/poop

bloglovin

There are 20 years 1 month 23 days 23 hours 9 minutes and 8 seconds until the end of time.
And, it has been 4 years 11 months 3 days 14 hours 53 minutes and 48 seconds since The Doctor saved us all from the end of the World!

Search

November 2017
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
Google

Linkblog

  XML Feeds

Who's Online?

  • Guest Users: 2
This seal is issued to lawrencechen.net by StopTheHacker Inc.
powered by b2evolution

hosted by
Green Web Hosting! This site hosted by DreamHost.

monitored by
Monitored by eXternalTest
SiteUptime Web Site Monitoring Service
website uptime