| | |
Get email with imap
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2007
Posts: 252
Reputation:
Solved Threads: 27
hello,
i am having some problems retrieving email from gmail. im not sure if its because its pop or what. unfortunatly my host doesnt have the pop module. but here is the code.
any help with this will be greatly appreciated.
i am having some problems retrieving email from gmail. im not sure if its because its pop or what. unfortunatly my host doesnt have the pop module. but here is the code.
php Syntax (Toggle Plain Text)
$imap = imap_open("{pop.gmail.com:995}INBOX", "username", "password"); $messages = imap_sort($imap, SORTFROM, 1); foreach ($messages as $message) { $header = imap_header($imap, $message); $prettydate = date("jS F Y", $header->udate); print "{$header->fromaddress} - $prettydate";?><br><?php } imap_close($imap);
any help with this will be greatly appreciated.
Last edited by ProfessorPC; Aug 8th, 2008 at 5:03 pm.
•
•
Join Date: Aug 2008
Posts: 381
Reputation:
Solved Threads: 33
Sorry, I have never done IMAP stuff with PHP (POP Yes) but luckily with all things Google there is plenty of documentation all over the web...
My first take is that you're using POP protocol on google's side of things
This link suggests you need to enable IMAP on google before using it ...
http://mail.google.com/support/bin/a...y?answer=75725
This is someone who has already done it, maybe you can learn through example here ...
http://deepakssn.blogspot.com/2006/0...-php-with.html
This is the PHP main site discussion on using IMAP methods in PHP ...
http://us2.php.net/imap_open
Here I find useful nuggets like this ... possibly a useful example
Sorry I can't help you more
Good luck
My first take is that you're using POP protocol on google's side of things
pop.gmail.com:995 ...This link suggests you need to enable IMAP on google before using it ...
http://mail.google.com/support/bin/a...y?answer=75725
This is someone who has already done it, maybe you can learn through example here ...
http://deepakssn.blogspot.com/2006/0...-php-with.html
This is the PHP main site discussion on using IMAP methods in PHP ...
http://us2.php.net/imap_open
Here I find useful nuggets like this ... possibly a useful example
PHP Syntax (Toggle Plain Text)
$mbox = imap_open ("{imap.gmail.com:993/imap/ssl}INBOX", "username@gmail.com", "password") or die("can't connect: " . imap_last_error());
Sorry I can't help you more
Good luck
![]() |
Similar Threads
- MS Outlook disappearing Inbox Email (Windows Software)
- MS Outlook 2003 IMAP Send Folder Problem (Windows Software)
- How to backup Outlook Express email folders and settings (Windows NT / 2000 / XP)
- Email agent for IMAP protocol (Java)
- Transferring email to a new provider (eCommerce)
- email attachment (Visual Basic 4 / 5 / 6)
- Optonline web/email hosting (Networking Hardware Configuration)
- Sending information to email (Visual Basic 4 / 5 / 6)
- Java email notifier (Java)
Other Threads in the PHP Forum
- Previous Thread: Displaying Data in Drop down menu
- Next Thread: Radio button checked?
| Thread Tools | Search this Thread |
ajax apache api array beginner binary body broken cakephp checkbox class cms code cron curl database date date/time display dynamic echo email error file files folder form forms function functions gc_maxlifetime global google host href htaccess html image include insert integration ip java javascript joomla limit link list login loop mail memmory menu mlm msqli_multi_query multiple mycodeisbad mysql navigation oop parameter parsing paypal pdf php problem query radio random recourse recursion regex registrationform remote script search seo server sessions sms soap source space sql static syntax system table tutorial update upload url validator variable video web webdesign wordpress xml youtube





