WordPress.org

Ready to get started?Download WordPress

Forums

Strange problem with post by email (6 posts)

  1. klug
    Member
    Posted 10 years ago #

    Hi,
    just downloaded and installed everything. Now I am trying to set up post by email.
    My POP account is read, the postings are included into the wp_posts mysql table but the posts are not shown on the weblog page (neiter index.php nor b2.php).
    What am I doing wrong?
    Thanks for any help
    Michael

  2. klug
    Member
    Posted 10 years ago #

    If I login I see the posts under "post/edit", but back to the site the items disappear again...

  3. Mike Little
    Member
    Posted 10 years ago #

    Hi Klug,
    I was going to suggest that this problem sounded like a time difference problem, but on checking the code it seems to cope with that ok. Unless you have use_phoneemail set to 1 in options.
    Still, can you check the timestamps on the posts which don't show, please.
    Mike

  4. klug
    Member
    Posted 10 years ago #

    Mike,
    thanks for your hint. You are very right, the problem is the timestamp. Yesterday I still spent some time researching on this and found out what was causing the error:
    b2mail.php takes the date and time information from the email and then adds the general $time_difference to it:
    $ddate_U = $ddate_U + ($time_difference * 3600);
    well, this logic is right or wrong depending on from where you are posting, where your server is and what you use the timedifference for.
    In my case it is wrong:
    I live in Europe and my webserver is in the USA. I have a $time_difference = 6 hours so times shown are my local time. When I send an email from here the email contains my local time, adding $time_difference to it will make it wrong (6 hours ahead). For example: at 1 pm here my server has a 7am timestamp. My email is marked 1pm and b2mail.php will make 7pm out of it..
    To fix my problem I commented out the line of code above. But it would be a nice feature if it was possible to define an $post_by_email_time_difference in the blog-by-mail-settings screen. Would you take this into the "wish-list"
    Thanks for the great software!
    Michael

  5. otaku42
    Member
    Posted 10 years ago #

    I suggest the following: instead of using $time_difference there should be an option to set the actual timezone the server is in. Additionally, each user should be able to set his home timezone in the user settings.
    The advantage is that $time_difference could be calculated dynamically and individually for each posting user. And it could solve the above described problem easily: instead of using the default timezone for "post by email" wp could use the timestamp out of the mail's header; given that the posting user configured his mail client correctly this could automatically adjust $time_difference to the timezone he is in.
    As an optimization it might be useful to give users the chance to override his default timezone with each post - would be a nice-to-have for people who travel a lot and therefore often postout of different timezones.
    Bye, Mike

  6. Anonymous
    Unregistered
    Posted 9 years ago #

    Did you ever roll something together for this? I'd love to make each post/author have their own idea of their timezone, so a post doesn't look like it's done at 2am if I'm outside the US.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.