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!
21 Responses to “postie”
Leave a Reply
Jim Hodgson, one year in high gear. is proudly powered by WordPress Entries (RSS) and Comments (RSS).










July 21st, 2006 at 6:16 am
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 :)
July 28th, 2006 at 9:18 am
Have you done anythign else to get it to work with gmail ?
i cant get it to work
August 4th, 2006 at 9:36 am
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?
August 23rd, 2006 at 5:19 pm
[…] BTW, this and this also fixed some of my problems today as well. Thanks guys! Search […]
September 19th, 2006 at 7:58 pm
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?
September 21st, 2006 at 1:25 pm
[…] Method 3: Postie extension. This works. It took some tweaking. Many thanks to Jim Hodgson at www.jimhodgson.com. His post was very helpful. There was a bug in the postie script. […]
October 3rd, 2006 at 8:05 am
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!
October 8th, 2006 at 6:57 pm
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
October 8th, 2006 at 7:00 pm
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
October 8th, 2006 at 7:03 pm
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.
October 8th, 2006 at 7:21 pm
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?
October 8th, 2006 at 8:48 pm
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.
December 28th, 2006 at 12:23 am
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!
February 4th, 2007 at 1:19 pm
[…] P.S. This site and this site were also helpful in one tech issues today. Meta […]
February 13th, 2007 at 5:43 am
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
March 3rd, 2007 at 7:13 am
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
March 22nd, 2007 at 12:04 am
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.
June 3rd, 2007 at 4:49 pm
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.
June 4th, 2007 at 4:23 am
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
July 11th, 2007 at 9:21 am
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”);
May 25th, 2008 at 5:57 am
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