![]() |
|
|
|
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| PHP / MySQL Assistance We understand. Not all of you are experienced programmers, but some of you are highly skilled at coding. So we've set aside this forum so you can ask questions, and provide answers to the most commonly asked PHP / MySQL issues. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Is it possible to make an IMAP connection to my mailbox? I've tried a few ways, but keep getting stumped.
Example below will return "Connection failed": Code:
if(imap_open ("{mail.hostname.com/imap}Inbox", $user, $pass))
{echo 'Connection success!';}
else
{echo 'Connection failed';}
Thanks for your time. --- I did confirm w/ a trouble ticket (WMJ-875739) that the IMAP functions are available. Which leaves to believe it's something w/ the code? Last edited by tzeench : 04-08-2008 at 09:18 AM. Reason: Update |
|
||||
|
Quote:
1. The IMAP port # 2. How is the username, it should you your full email address 3. The host should be mail.yourdomain.com and thats alll (I believe)
__________________
Thanks, Denis Motova Affiliate / Operations Manager HostICan Answers | HostICan Newsletter | HostICan Blog | Become a HostICan Affiliate | Create a Support Ticket. |
|
|||
|
Quote:
Code:
<?php
if(imap_open ("{mail.mydomain.com:993/imap/ssl}Inbox",$user, $password"))
{echo 'Connection success!';}
else
{echo 'Connection failed';}
?>
As for the how the user name is passed via a variable and I am using the entire email address for the user name (password is also passed via a variable): Code:
<?php $user = "me@mydomain.com"; ?> |
|
|||
|
Got it!
Though I wasn't able to get it connect via SSL, but that really did not matter. It looks like I needed to pass the /notls parameter. /notls - do not do start-TLS to encrypt the session, even with servers that support it For you info here's the code that worked. Code:
<?php
if(imap_open ("{mail.mydomain.com/imap/notls}Inbox", $user, $pass))
{echo 'Connection success!';}
else
{echo 'Connection failed';}
?>
Last edited by tzeench : 04-09-2008 at 01:50 PM. |
|
||||
|
Hey,
You did all the hard work, glad I could help... not much of a programmer... :P
__________________
Thanks, Denis Motova Affiliate / Operations Manager HostICan Answers | HostICan Newsletter | HostICan Blog | Become a HostICan Affiliate | Create a Support Ticket. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|