php1 Posted October 23, 2008 Share Posted October 23, 2008 is it possible to read email using php? how to use imap functiions to read email. whther we have to install anything or change the php.ini file to use imap functions Quote Link to comment https://forums.phpfreaks.com/topic/129712-how-to-read-email-using-php/ Share on other sites More sharing options...
d_barszczak Posted October 23, 2008 Share Posted October 23, 2008 Yes. There are various ways of doing this but i suggest you create a dummy email accout to learn with then have a read about the function on the link below: http://uk.php.net/imap Quote Link to comment https://forums.phpfreaks.com/topic/129712-how-to-read-email-using-php/#findComment-672601 Share on other sites More sharing options...
php1 Posted October 23, 2008 Author Share Posted October 23, 2008 plz help me on how to configure imap with php 5.1.6 when i check phpinfo() the imap section is not there. Quote Link to comment https://forums.phpfreaks.com/topic/129712-how-to-read-email-using-php/#findComment-672624 Share on other sites More sharing options...
d_barszczak Posted October 23, 2008 Share Posted October 23, 2008 What OS are you running PHP on? You need the PHP_IMAP extension installed. Quote Link to comment https://forums.phpfreaks.com/topic/129712-how-to-read-email-using-php/#findComment-672626 Share on other sites More sharing options...
php1 Posted October 23, 2008 Author Share Posted October 23, 2008 i am using fedora core 6 Quote Link to comment https://forums.phpfreaks.com/topic/129712-how-to-read-email-using-php/#findComment-672647 Share on other sites More sharing options...
d_barszczak Posted October 23, 2008 Share Posted October 23, 2008 You will need to make sure the php_ldap.so extension is in your php extensions directory and that you have a line in your extensions list along the lines of: extension=php_ldap.so ;extension=php_ldap.so This may already exists as a comment so just remove the semi-colon to apply. You may also have to restart the apache service. Quote Link to comment https://forums.phpfreaks.com/topic/129712-how-to-read-email-using-php/#findComment-672676 Share on other sites More sharing options...
php1 Posted October 23, 2008 Author Share Posted October 23, 2008 i do not have such a extension in my php.ini file which is stored in /etc/php.ini Quote Link to comment https://forums.phpfreaks.com/topic/129712-how-to-read-email-using-php/#findComment-672688 Share on other sites More sharing options...
d_barszczak Posted October 23, 2008 Share Posted October 23, 2008 OK so your installation did not come with the php_imap installed. You need to download the file into your extensions directory and insert the line above. Quote Link to comment https://forums.phpfreaks.com/topic/129712-how-to-read-email-using-php/#findComment-672690 Share on other sites More sharing options...
php1 Posted October 23, 2008 Author Share Posted October 23, 2008 i used yum install and now i can see imap section in it. whther it means my imap installed? where i have to put these extension. under which section? Quote Link to comment https://forums.phpfreaks.com/topic/129712-how-to-read-email-using-php/#findComment-672698 Share on other sites More sharing options...
d_barszczak Posted October 23, 2008 Share Posted October 23, 2008 I use ubuntu myself but i assume yum is the package manager for fedora. If imap shows up in phpinfo() then it is installed. You should then be able to connect to an imap/pop3 server. Quote Link to comment https://forums.phpfreaks.com/topic/129712-how-to-read-email-using-php/#findComment-672700 Share on other sites More sharing options...
php1 Posted October 23, 2008 Author Share Posted October 23, 2008 thank u so much for ur great help. I also have one doubt that how to set up a imap/po3 server for linux system. <?php $server = "www.rediffmail.com"; $user = "joby"; $pass = "jobytest"; $conn = @imap_open("\{$server/imap}INBOX", $user, $pass) or die("Connection to server failed"); ?> i got as connection to server failed. whether i have to do any other things to make my imap working Quote Link to comment https://forums.phpfreaks.com/topic/129712-how-to-read-email-using-php/#findComment-672714 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.