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

email to b2evolution

04/27/08

Permalink 11:49:06 pm, by The Dreamer Email , 195 words   English (US)
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.


Trackback address for this post

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

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.

My Latest Tweets

August 2008
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 31
There are 5 months 27 days 19 hours 22 minutes and 3 seconds until the end of Analog Broadcast TV.
There are 29 years 4 months 28 days 15 hours 36 minutes and 10 seconds until the end of time.

Search

Google

Linkblog

XML Feeds

multiblog

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

monitored by
Monitored by eXternalTest
website uptime