Reputation: 390
i want to read mails from a mail account. In my outlook i can read the mails with no problem. the settings in outlook are: Type:IMAP Server:sub.mailsvr.de user:user1 pwd:pwd1 ports are standard
Now i want to read the inbox with php. My Code so far
$Mailkonto['imapopen'] == "{sub.mailsvr.de:143}INBOX";
$Mailkonto['user'] == "web15p13";
$Mailkonto['pwd'] == "PVDtqnKV";
$mbox = imap_open ($Mailkonto['imapopen'], $Mailkonto['user'], $Mailkonto['pwd']);
i get the following error
echo "<pre>";
print_r(imap_errors());
echo "</pre>";
Array
(
[0] => Can't open mailbox : no such mailbox
)
Has Somebody an idea, what i have to change to read the mails ?
Upvotes: 0
Views: 378
Reputation: 91792
You are not assigning any variables but using a boolean comparison without doing anything with the result:
$Mailkonto['imapopen'] == "{sub.mailsvr.de:143}INBOX";
$Mailkonto['user'] == "web15p13";
$Mailkonto['pwd'] == "PVDtqnKV";
Should be:
$Mailkonto['imapopen'] = "{sub.mailsvr.de:143}INBOX";
$Mailkonto['user'] = "web15p13";
$Mailkonto['pwd'] = "PVDtqnKV";
Upvotes: 2