Jump to content


VlexoFree Notice

Interviews will be open every Friday starting at 12am PDT and lasting for 24 hours.

- - - - -

php and IMAP


  • Please log in to reply
6 replies to this topic

#1 swoop80

swoop80

    Member

  • Pre-Members
  • 19 posts

Posted 14 January 2009 - 04:10 PM

First - let me say I REALLY appreciate the free hosting.  It's going to make all the difference in being able to get a solution developed expeditiously.

Status: I have explored my new site and run a very simple PHP script.  So, things are GREAT so far.

However, Now I am trying to do a simple IMAP procedure via PHP - and that isn't working.  I note that the version of PHP that we have available is pretty new - and I also have found that accessing "GMAIL" in the way that I'm trying to do (via CURL and IMAP) is hit and miss... (or, at least I can't find consistent rules on how to do it).

So - that is my question:

Has anyone here had experience using IMAP to access your gmail?  If so, did that stop working for you when gmail changed recently (or when you went to a newer version of PHP)?

Thanks for putting up with the newb questions...

Gary

Edited by swoop80, 14 January 2009 - 11:21 PM.


Ad Bot


      #2 Jan J

      Jan J

        Advanced Member

      • VlexoFree Support
      • 960 posts

      Posted 15 January 2009 - 05:19 AM

      imap on gmail is working for me, using imap.gmail.com and your email address as username so if you are user@gmail.com then enter user@gmail.com not just user.
      But I have no experiences in how to handle imap requests with php.

      Some explanations are listed here:
      http://www.php.net/m...en/ref.imap.php

      but I am not sure if the required module is installed on our server. Please wait for one of our admins to reply.

      EDIT: Have a look at http://forum.vlexo.c...read.php?t=5122

      Edited by Jan J, 15 January 2009 - 05:37 AM.

      Regards,
      Jan J

      #3 swoop80

      swoop80

        Member

      • Pre-Members
      • 19 posts

      Posted 15 January 2009 - 10:20 AM

      That's helpful - thanks Jan!  Would you perhaps be able to share the example that you have working (I'll probably be able to understand it enough for it to help... I hope).

      Thanks!

      Gary

      #4 eRott

      eRott

        Advanced Member

      • Pre-Members
      • 370 posts

      Posted 15 January 2009 - 06:13 PM

      swoop80 said:

      That's helpful - thanks Jan!  Would you perhaps be able to share the example that you have working (I'll probably be able to understand it enough for it to help... I hope).

      Thanks!

      Gary

      Hello Gary,

      Let me first start by clarifying what Jan was trying to say. I believe Jan was referring to using a mail client such as Thunderbird or Outlook and that accessing his mail via IMAP (in conjunction with these mail clients) was working. I do not think Jan is using any personal PHP scripts to check his Google mail.

      With that said, while I have had no personal experience creating or using my own PHP mail scripts to access my email stored on Google's Gmail servers, you could take a look at THIS ARTICLE. It may help you out.

      On a second note, why would you want to create or use a PHP script to access your gmail email via IMAP in the first place? Why not just access Gmail directly via a web-browser or use a mail client such as Thunderbird. Both of which are probably much safer and secure options.

      Hope that helps.
      Take care.

      #5 swoop80

      swoop80

        Member

      • Pre-Members
      • 19 posts

      Posted 15 January 2009 - 10:34 PM

      Thanks for the info - and the article.  I've tried what it said there but still don't really have it working.

      Something I picked up from the article was talking about how to "set up IMAP" on Linux... Now, I'm pretty sure that I really don't need to be concerned about this info from that article (because I think PHP, CURL, IMAP, and lots of other stuff is ALREADY set up for me), but I thought I'd better ask:    Can an Admin tell me if I should be trying to configure IMAP for use on this free hosted site?   The concern for this stemmed from this from that article:

      Configuring PHP on Linux with IMAP support

      To enable IMAP support on your PHP installation you need to compile PHP with the --with-imap argument. You also need to download the IMAP library here. Once you've downloaded it, copy c-client/c-client.a to /usr/local/lib/libc-client.a. Also copy c-client/rfc822.h, mail.h and linkage.h to /usr/local/include or some other directory in your include path.

      Oh - and in regards to the question about why I might want to do this sort of programming - the answer has to do with the fact that "email" can be used for more than just "email".  A formatted set of "words" in the body or subject of an email can be used by programs as "input".  That's what I'm experimenting with right now.

      Thanks.

      #6 Eli L

      Eli L

        VlexoFree Owner

      • Owner
      • 6,950 posts
      • LocationWashington, USA

      Posted 16 January 2009 - 02:47 PM

      You you look in at the phpinfo for the server then you will see that imap is enabled.

      Posted Image


      Please do not PM me for support (unless its a private matter). Instead, post in the appropriate forum and help will be provided accordingly.
      Helpful links: Terms of Service | Privacy Policy | Wiki - Tutorials & Help | VlexoFree Support |


      #7 swoop80

      swoop80

        Member

      • Pre-Members
      • 19 posts

      Posted 17 January 2009 - 04:04 PM

      Yes - I looked at the phpinfo and it does appear that it is enabled.

      Today, I have been working with an expert to make POP3 access work via a PHP script.  That expert has helped many people do such things - and he helped me clear up an issue or two.  However, he told me that the probable cause that remains is that the needed outbound "ports" are not enabled for my scripts to use.  

      For the particular script I'm using at the moment, port 995 is needed.  But there are other port numbers of similar interest.  Is there someone who can help me figure out the port settings?

      Thanks!




      1 user(s) are reading this topic

      0 members, 1 guests, 0 anonymous users