post-page

IMAP support for PHP and goofy errors

2
responses
by
 
on
October 9th, 2004
in
Code

I scratched my head over this for a couple of hours and hope that someone else can benefit from my sore scalp!

Imap mail functions for PHP are very easy to use and are quite quick. They can even be used for normal POP3 connections without certain IMAP functions. I have used them exclusively in a lot of my email scripts. However, almost every installation is different. If you are using imap_open function to open your mailbox, various servers will have different headaches with the function. The one surefire way to get around those headaches (when opening POP3 mailboxes) is to use the code below with your modifications. Basically, you have to specifically request a non-SSL connection everytime or your script MIGHT bork. Also, specifying INBOX saves headaches in many cases.


$mbox = imap_open( "{yourmailserver.com/pop3:110/notls}INBOX", "username", "password" );

heading
heading
2
Responses

 

Comments

  1. radhika says:

    I really like your product and I agree with all your comments and suggestions

  2. Mark says:

    If you want to use IMAP you will need to recompile PHP with IMAP support, I know of no other easy way.

    If you are on a Windows server, you might be able to add the php_imap.dll in your php.ini http://www.php.net/manual/en/ref.imap.php

    I have also seen cases where installing the following adds IMAP support in PHP
    http://www.wesmo.com/rpm2html/......i386.html



Obviously Powered by WordPress. © 2003-2013

page counter
css.php