Jump to content

Recommended Posts

Posted

Hi, I have tried to connect to my imap-mailbox via php...

but it always spits out this error:

Warning: imap_open() [function.imap-open]: Couldn't open stream [...]

 

One of many tested versions:

imap_open("{mail.nyten.heliohost.org:143}", "test@nyten.heliohost.org", "PASSWORD");

 

 

Please help me.

Posted

Try something like this:

 

<?php

$hostname = "{localhost:993/imap/ssl/novalidate-cert}INBOX";

$username = "YOUR_USERNAME";
$password = "PASSWORD";

$inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Mail' . imap_last_error());
echo "<h2>Connected to Mail!</h2>";
imap_close($inbox);
?>

 

One more thing. This is not your username: test@nyten.heliohost.org. Your username for default mail is the same username you login with.

Posted

Thank you both.

 

It accepts the hostname localhost:993/imap/ssl/novalidate-cert

 

test@nyten.heliohost.org is just an email address that I created to test this.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...