FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


imap not works but it works from my local machine





rjraaz
Code:
<?php
$mbox = imap_open("{mail.aaz.tk:143/novalidate-cert}", "myusername", "password");

echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{mail.aaz.tk:143}", "*");

if ($folders == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($folders as $val) {
        echo $val . "<br />\n";
    }
}

echo "<h1>Headers in INBOX</h1>\n";
$headers = imap_headers($mbox);

if ($headers == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($headers as $val) {
        echo $val . "<br />\n";
    }
}

imap_close($mbox);
?>


when i use above code i got following error:
Fatal error: Call to undefined function imap_open()
badai
there is no imap_connect() function in php.

see http://www.php.net/manual/en/ref.imap.php

you must use a "user made" function. try search your whole hardrive for *.php files that contain imap_connect, imap_listmailbox, imap_headers and imap_close then copy over the whole folder to server, then use require() on include() to "insert" the file in your php code.

ahh... if you got to ask this, i guess it's a long way to go for you. maybe there are some sort of documentation in the folder where you will find those files and can guide you on how to use their class/function.
rjraaz
ok that means i have to use fsockopen to accessing pop imap server.

and have to build my function, there should be no function on frihost server.

because when i use from local machine it works fine.
badai
try replacing imap_connect with imap_open

Code:
$mbox = imap_open("{mail.aaz.tk:143/novalidate-cert}", "myusername", "password");
rjraaz
badai wrote:
try replacing imap_connect with imap_open

Code:
$mbox = imap_open("{mail.aaz.tk:143/novalidate-cert}", "myusername", "password");


oh sorry i have typed wrong that is my mistake actually there is imap_open also not working.
badai
so, what's the error message when you use imap_open?
rjraaz
badai wrote:
so, what's the error message when you use imap_open?


same as i mentioned above but gives error only frihost server.

Fatal error: Call to undefined function imap_open()
badai
simple google search brought me here:

http://anl4u.com/?p=50

i'm on server 2. after running phpinfo, IMAP module is not loaded. you might need to talk to bonding.
Bondings
I'm sorry, but we normally don't provide imap in php considering it is rather hard to get it to work.

Anyway, if you really need it, I can try to install it, but I won't promise anything.
rjraaz
Bondings wrote:
I'm sorry, but we normally don't provide imap in php considering it is rather hard to get it to work.

Anyway, if you really need it, I can try to install it, but I won't promise anything.


hey bonding thanks for reply

could you tell me one thing is it possible to access pop3 using fsockopen

if it is possible then there is no need to install imap if fsockopen works i didnt try fsockopen.

if possible i will modify my code.

thanks in advance
Related topics
Help: SQL error after uploading new files(thread updated)
Great php editor
Windows Tips&tricks!
Problem with opening a word doc from site hosted in frihost
May i Install EyeOs in my hosting?
phpNuke Register new users Problem Problem
Forums: Which do you use?
vbsys2.dll = Trojan horse?
Problem with email through Thunderbird
hashing your passwords
Error Upon Installing phpBB 3.0.2
Java - Can't load resources
php developement tool with preview.
Are fonts always local stored?
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.