Reading mail with PHP, IMAP versus POP + confi
Posted: Thu Jul 24, 2008 11:15 am
I decided I'm going to try and read email sent to a mail account on my live server though I could use a little help with what I should keep my focus on.
I know that there is imap and pop mail though I don't know much about how they work. So I looked at some tutorials to figure out the basic functions because I want to learn from the ground up and existing/working scripts are a good reference to go by. The imap_open function seemed to be a good place to start but I keep getting the following error...
That script gives me the following message...
Any way I'm very open to suggestions for simply connecting to the mail server on my live host. This script once finished will only be used by me if that has any bearing on "style" choices (if there are any "style choices" in the sense of pop versus imap.
I know that there is imap and pop mail though I don't know much about how they work. So I looked at some tutorials to figure out the basic functions because I want to learn from the ground up and existing/working scripts are a good reference to go by. The imap_open function seemed to be a good place to start but I keep getting the following error...
So after some searching on Google I read that it's a module (like cURL in example) that has to be installed and enabled. So I ran the following script which apparently will display modules enabled on the (live) server...Call to undefined function imap_open()
Code: Select all
<?php
echo "<pre>".implode("\n",get_loaded_extensions())."</pre>";
dl("imap.so");
if (extension_loaded("imap")) echo "<pre>imap loaded</pre>";
else echo "<pre>imap not loaded</pre>";
imap_open("server", "username", "password");
?>Does this mean I can't use imap? Or pop? Nothing called pop is listed in the list but to maybe get the thread moving along quickly I'll post the list here now...Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/imap.so
Besides security and writing good code I don't really care about the "style" of fetching email from the server right now...if that is the only difference between pop and imap. I've done some reading on Wiki about them though a storm is forcing me to kind of rush through this post so I'll do more reading after the storm.zip, xmlwriter, libxml, xmlrpc, dom, xmlreader, xml, tokenizer, session, pcre, SimpleXML, SPL, sockets, soap, SQLite, standard, Reflection, pspell, posix, mysqli, mysql, mime_magic, json, iconv, hash, gettext, gd, ftp, filter, exif, date, , url, ctype, calendar, bcmath, zlib, openssl, apache2handler, apc
Any way I'm very open to suggestions for simply connecting to the mail server on my live host. This script once finished will only be used by me if that has any bearing on "style" choices (if there are any "style choices" in the sense of pop versus imap.