•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 375,200 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,227 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 398 | Replies: 7
![]() |
•
•
Join Date: Mar 2008
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 1
i am not able to open the imap function and i can't retrive the email from the mailbox...
and i am using this code
ad error occured is :
plz short out my problem as soon as possible...
and i am using this code
php Syntax (Toggle Plain Text)
<?php $name = 'jeetrajsah@gmail.com'; $pwd = '9871670594'; $mailbox = '{mail.google.com}INBOX'; $mbox=@imap_open ($mailbox, $name, $pwd); print_r(imap_errors()) ?>
ad error occured is :
Warning: imap_open() [function.imap-open]: Couldn't open stream {mail.google.com}INBOX in c:\wamp\www\REMAIL\fetch_mail_view.php on line 13
Array ( [0] => Can't connect to googlemail.l.google.com,143: Timed out (10060) ) plz short out my problem as soon as possible...
Last edited by peter_budo : Apr 30th, 2008 at 10:00 am. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Nov 2006
Location: South Wales
Posts: 159
Reputation:
Rep Power: 2
Solved Threads: 10
Have you ensured the IMAP connections are allowed within your gmail account?
Go to gmail.com and check you account settings to ensure it's allowed.
Regards,
Alex
Go to gmail.com and check you account settings to ensure it's allowed.
Regards,
Alex
If you find my post useful please add to my reputation!! Thanks!
ajtrichards web solutions
http://www.ajtrichards.co.uk
ajtrichards web solutions
http://www.ajtrichards.co.uk
•
•
Join Date: Nov 2006
Location: South Wales
Posts: 159
Reputation:
Rep Power: 2
Solved Threads: 10
Also, when I connect to googlemail via IMAP I have used Port 993 using the following connection string:
php Syntax (Toggle Plain Text)
$mbox_open = imap_open ("{imap.googlemail.com:993/imap/ssl}[Google Mail]/Sent Mail", "emailaddress@gmail.com", "password");
If you find my post useful please add to my reputation!! Thanks!
ajtrichards web solutions
http://www.ajtrichards.co.uk
ajtrichards web solutions
http://www.ajtrichards.co.uk
•
•
Join Date: Mar 2008
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 1
•
•
•
•
Also, when I connect to googlemail via IMAP I have used Port 993 using the following connection string:
php Syntax (Toggle Plain Text)
$mbox_open = imap_open ("{imap.googlemail.com:993/imap/ssl}[Google Mail]/Sent Mail", "emailaddress@gmail.com", "password");
i am using urs code but is it not working correct ..that code occuring error like..
Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.googlemail.com:993/imap/ssl}[Google Mail]/Sent Mail in c:\wamp\www\REMAIL\fetch_mail_view.php on line 22
not connect
when i am using this code:--
$mbox_open = imap_open ("{imap.googlemail.com:993/imap/ssl}[Google Mail]/Sent Mail", "emailaddress@gmail.com", "password");
•
•
Join Date: Nov 2006
Location: South Wales
Posts: 159
Reputation:
Rep Power: 2
Solved Threads: 10
Did you check if the IMAP function had been enabled in GMail?
If you find my post useful please add to my reputation!! Thanks!
ajtrichards web solutions
http://www.ajtrichards.co.uk
ajtrichards web solutions
http://www.ajtrichards.co.uk
•
•
Join Date: Mar 2008
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 1
hi ..
i am not able to open to gmail through imap ..so plz give me suggestion ...how i open gmail and fetch the email... what i make a configuration ...because ssl is not working...
and i am using urs code.... but that code is not working properly..
so plz configure my problem as soon as possible...
i am not able to open to gmail through imap ..so plz give me suggestion ...how i open gmail and fetch the email... what i make a configuration ...because ssl is not working...
and i am using urs code.... but that code is not working properly..
so plz configure my problem as soon as possible...
•
•
Join Date: Nov 2006
Location: South Wales
Posts: 159
Reputation:
Rep Power: 2
Solved Threads: 10
I've tried this code myself and I can definately connect.
To connect to another mailbox e.g Sent Mail, etc you need to change the mailbox string to:
php Syntax (Toggle Plain Text)
<?php $name = 'emailaddress@gmail.com'; $pwd = 'password'; $mailbox = '{imap.googlemail.com:993/imap/ssl}'; $mbox = imap_open ($mailbox, $name, $pwd); $emails = imap_headers($mbox); foreach($emails as $header_text){ echo $header_text.'<br/>'; } ?>
To connect to another mailbox e.g Sent Mail, etc you need to change the mailbox string to:
php Syntax (Toggle Plain Text)
$mailbox = '{imap.googlemail.com:993/imap/ssl}[Google Mail]/Sent Mail';
If you find my post useful please add to my reputation!! Thanks!
ajtrichards web solutions
http://www.ajtrichards.co.uk
ajtrichards web solutions
http://www.ajtrichards.co.uk
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Other Threads in the PHP Forum
- Previous Thread: Refresh a query?
- Next Thread: PHP / CSS incompatibility?


Linear Mode