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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...