ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-general
php-general
Re: [PHP] PHP and connection to mail account
by Stut other posts by this author
Dec 13 2006 7:47AM messages near this date
Re: [PHP] PHP and connection to mail account | Re: [PHP] PHP and connection to mail account
Jochem Maas wrote:
>  Angelo Zanetti wrote:
>    
> > Do u know if its possible with PHP to receive a mail or connect to a
> > mail box and do something with an incomming email ? I see there is that
> > imap_open() but also there are sockets.
> >     
> 
>  indeed - basically use whatever you want! - I would suggest have a search online,
>  there are quite a lot of mailbox related classes/libs/etc as well as fully featured
>  php webmail packages that you might be able to scrounge some useful code out of.
> 
>  an alternative could be to configure your mail server to pipe the incoming
>  email directly to your script (i.e. don't deliver it to a mailbox at all) -
>  this has the advantage that your script doesn't have to run as a daemon (or via cron)
>  in order to poll the given mailbox - it simply recieves the email on stdin
>  whenever an email arrives.

Just to add something to consider... which way you do it can depend on 
what your script will be doing and how many emails you expect to 
receive. If the script is intensive and/or you are expecting a lot of 
emails you're better off cron'ing a script to deal with them otherwise 
your server could end up bogged down by those processes. I can't speak 
for other MTAs but I do know that with Postfix you can apply a limit to 
the number of simultaneous processes that are started if you implement 
it in the transport map.

-Stut

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Angelo Zanetti
Jochem Maas
Stut
Jochem Maas
Aras

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved