postie

Pardon me while I get nerdy for a minute. Those of you who have known me for a while will remember that I did work in technology before I became a man of leisure.

At any rate, to get the wordpress plugin postie to work with gmail, one must change line 72, which looks like this:
$this->_connection = imap_open("\{$server:$port$option}",$login,$password);

To these two lines:

$server_string = "{".$server.":".$port.$option."}INBOX";
$this->_connection = imap_open($server_string,$login,$password);

Otherwise, gmail responds with a “No such mailbox” error. Yay!

Now I can post to my blog from anywhere using my cell phone. How badass is that?

I can’t fucking figure this out, but sometimes the posts from my phone link to popups, and sometimes not. It seems to be completely arbitrary.

Anyway, you can see how there’s a column to the right of the main page that is the latest images from my phone. It’s neato!

If you liked this, share this!
  • Print
  • Digg
  • Facebook
  • Google Bookmarks
  • Fark
  • Twitter
  • MySpace
  • Reddit
  • StumbleUpon
This entry was posted in Snarky Invective. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
Please note that any below comments are the opinions of the authors and not those of this site or its owner. Read them at your own risk!

18 Comments

  1. Posted July 21, 2006 at 6:16 am | Permalink

    I tried your sugestion now I am getting…

    #!/usr/bin/php -q Connecting to pop.gmail.com:995 (pop3-ssl)) as blahblah@gmail.com Ooops Can’t open mailbox {pop.gmail.com:995/service=pop3/ssl/notls/novalidate-cert}INBOX: invalid remote specification

    This was the error I was getting…

    #!/usr/bin/php -q Connecting to pop.gmail.com:995 (pop3-ssl)) as blahblah@gmail.com Ooops Can’t open mailbox \{pop.gmail.com:995/service=pop3/ssl/notls/novalidate-cert}: no such mailbox

    so I guess this is an improvement :)

  2. Posted July 28, 2006 at 9:18 am | Permalink

    Have you done anythign else to get it to work with gmail ?

    i cant get it to work

  3. Posted August 4, 2006 at 9:36 am | Permalink

    Wow Jim! Great help! Thanks a bunch! I finally got my WordPress-writing-by-Gmail thingy to work! Is your music as good as your programming?

  4. Posted September 19, 2006 at 7:58 pm | Permalink

    Please note, I did not need this fix when I was using PHP4, but when I upgraded to PHP5 this fixed my no such mailbox problem.

    Can others validate that this is only needed in PHP5?

  5. Josh Wex
    Posted October 3, 2006 at 8:05 am | Permalink

    I’m trying to get Postie to properly display HTML emails that contain pictures within the email message. Right now, no pictures are displayed. Would you have any idea how to fix this??

    Thanks!

  6. Posted October 8, 2006 at 6:57 pm | Permalink

    1. I use Gmail and I’m hosted on Go Daddy. I know I can’t set up a cronjob with Go Daddy, but that’s a separate issue.
    2. In Configure Postie I could only select POP3 and not POP3-SSL, so I opened config_form.php and forced the coniditional in line 343 to return true.
    3. I replaced line 72 in postieIMAP with the two lines above.
    4. When I clicked on Run Postie in Configure Postie, I got the following:

    MAKE SURE POP IS TURNED ON IN SETTING AT Gmail

    Connecting to pop.gmail.com:995 (pop3-ssl))

    Fatal error: Call to undefined function: imap_open() in xxxx/wordpress/wp-content/plugins/postie/postieIMAP.php on line 73

  7. Posted October 8, 2006 at 7:00 pm | Permalink

    Follow-up:

    Obviously, this means that HasIMAPSupport(false) is returning false…and that’s why I couldn’t select POP3-SSL in the first place. So why is HasIMAPSupport(false) returning false?

    P

  8. Posted October 8, 2006 at 7:03 pm | Permalink

    OK…I’m dumb. When I click on Test Config, I get this:

    Missing imap_open Sorry – you do not have IMAP php module installed – it is required for this mail setting.

  9. Posted October 8, 2006 at 7:21 pm | Permalink

    OK, so now I’m in over my head. Go Daddy won’t allow me to use the IMAP module.

    BUT, Gmail uses POP3, not IMAP. So what’s the problem? Isn’t there a POP3 SSL module or something?

  10. Posted October 8, 2006 at 8:48 pm | Permalink

    So in case the Gmail thing never works out, I set up a Yahoo account, setup POP access, confirmed POP access via Outlook Express, and then changed the settings in Configure Postie, but now I get this:

    Warning: fsockopen(): unable to connect to pop.mail.yahoo.ca:110 in xxxxx/wordpress/wp-includes/class-pop3.php on line 87
    Unable to connect. The server said – POP3 connect: Error [110] [Connection timed out]
    Try putting in your full email address as a userid and try again.

    I tried my full e-mail address and that doesn’t work, either.

  11. Posted December 28, 2006 at 12:23 am | Permalink

    Jim:

    A *big* thank you for this. I was getting close to giving up in disgust, getting postie to work with courier-imap(-ssl) on my mail server. I was getting the same error, and yet could login manually, so I knew that the daemon was working. Your code fixes allow me to login just fine, at least with imap (I haven’t tried imaps yet).

    Again, thanks!

  12. Posted February 13, 2007 at 5:43 am | Permalink

    This didn’t seem to work for me:(
    Still get this error

    Warning: imap_open() [function.imap-open]: Couldn’t open stream {pop.gmail.com:995/service=pop3/ssl/notls/novalidate-cert}INBOX in /homepages/9/d188817997/htdocs/phooblog/wp-content/plugins/postie/postieIMAP.php on line 72
    Unable to connect. The server said – Can’t open mailbox {pop.gmail.com:995/service=pop3/ssl/notls/novalidate-cert}INBOX: invalid remote specification
    Try putting in your full email address as a userid and try again.

    Cheers if you can help

  13. Posted March 3, 2007 at 7:13 am | Permalink

    Another slight fix for those people trying to get Postie to work with Google Apps for Domains or Gmail is available on my website. Just a little code change – a syntax problem.

    http://www.sprayfly.com

    Hope this helps.
    Jono

  14. Posted March 22, 2007 at 12:04 am | Permalink

    If you are having problems with getting postie to work with gmail, and you are using a Win32 server machine, your problem may be related to these PHP bugs…

    http://bugs.php.net/bug.php?id=29036
    http://bugs.php.net/bug.php?id=36496

    Apparently php_imap.dll doesn’t work with php_openssl.dll on Win32.

    The bug appears to have been fixed in PHP builds after Feb. 19, 2007.

  15. Jan
    Posted June 3, 2007 at 4:49 pm | Permalink

    Hi,
    I got a similar problem. I am neither using postie nor wordpress but it would be really helpful if someone could post the working line of code for imap_open.

    Right now I get the following error:
    Failed with error: Can’t open mailbox {pop.gmail.com:995/service=pop3/ssl/notls/novalidate-cert}INBOX: invalid remote specification

    So I think I got the syntax right, but I am not quite sure, which options I have to turn on or off.
    ssl = on!
    notls? tls?
    novalidate-cert? validate-cert?
    norsh?
    … and so on.

    Could someone please post the working imap_open syntax. Thank you!

    bye
    Jan

    PS: I am using PHP5.0.4 on a Linux Redhat System.

  16. Karlja
    Posted June 4, 2007 at 4:23 am | Permalink

    Hi,
    could you post the working imap_open statement that’s actually send to Gmail? (of course without the passwort and the user)

    Like this:
    {pop.gmail.com:995/service=pop3/ssl/notls/novalidate-cert}INBOX

    Thank You.
    Karlja

  17. Posted July 11, 2007 at 9:21 am | Permalink

    For Karlja and/or anyone else who is wanting to use imap_open() with GMail, but not using Wordpress:

    $mailbox = imap_open(“{pop.gmail.com:995/pop3/ssl/notls}INBOX”, “your@email.com”, “password”);

  18. Posted May 25, 2008 at 5:57 am | Permalink

    Hi Jim, only one question. POstie works great, I post with gmail but can’t put links in the post. Do you know how can I write links? Is there some tag to do it?
    Thank you very much

3 Trackbacks

  1. By Mysql broken at simonandmary.net on August 23, 2006 at 5:19 pm

    [...] BTW, this and this also fixed some of my problems today as well. Thanks guys! Search [...]

  2. [...] Method 3: Postie extension.  This works.  It took some tweaking.  Many thanks to Jim Hodgson at http://www.jimhodgson.com.  His post was very helpful.  There was a bug in the postie script. [...]

  3. By Broken Mysql at simonandmary.net on February 4, 2007 at 1:19 pm

    [...] P.S. This site and this site were also helpful in one tech issues today. Meta [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Welcome!

    Hello and welcome, friend! My name is Jim and this is my blog, constructed entirely of dreams and opinions. My lawyer said that a disclaimer would be a good idea, but he didn't include any jokes to go with it. Damned if I can think of any either.

    Subscribe via Email

    Or by RSS

    Pat Passed Away

    I wrote and watercolor-illustrated a little book about my Mom passing away. Download it for free and consider a donation to her favorite charity, the Revlon Run Walk for women.

     

  • Latest Flickr images

    leg hairNOODLCES!night mountain bike!mountain bike fixins
  • Categories

  • Archives

  • Most Popular Posts

  • Recent Comments

  • The Latest from Twitter...

    • All you haters adjust my cockpit. I think my stem is too long. 48 mins ago
    • Sweet I don't have to do the dirt section. I'm just doing the TT and its all road. 4 hrs ago
    • Nate's just informed me why they call the Perry TT race "Perry Roubaix" - it has a dirt road section. 4 hrs ago
    • More updates...
  • Jim Hodgson on Facebook

    Hosted on iThought.org

    None of this would be possible without my friend Chris and his hosting business, iThought.org. Thank you!