Call to undefined function imap_open()


I have a problem with php_imap to retrieve e-mail data.
I did not find the solution in scriptcase forum.

Code is like that:
$domain = “”;
$servSmtp = “smtp.”.$domain;
$port = “143”."/novalidate-cert";
$user = “youremail”."@".$dom;
$pass = “yourpassword”;
$con = “{”.gethostbyname($servSmtp).":".$port."}INBOX";
// $con = chr(123).gethostbyname($servSmtp).":".$port.chr(125).“INBOX”;

$mail_box = imap_open($con, $user, $pass);
echo imap_num_msg($mail_box);

Just a simply code in a blank return this error: “Call to undefined function imap_open()”
There’s a way to add external librarys or something?

Hello Takeo,
your problem regarding the undefined function imap_open() is not a Scriptcase problem at all.

In fact PHP on the server you’re running Scriptcase on does not support this functionality.

If you run a simple php script with the phpinfo() function it will show you, if the imap extension is installed.
On my server it shows somewhere:

Please refer to your server PHP and you may read:

Hope this helps.

Gunter Eibl
Scriptcase coach

1 Like

Thanks GunterEibl,

I didn’t know that.
Just contacted the infrastructure to setup the imap.

I inform you here if it works.

Thanks again.