Re: Update site through email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Manuel Lemos wrote:
Hello,

on 06/29/2006 10:54 AM Rodrigo de Oliveira Costa said the following:
Hy guys I'd like to know if there is a way to update a site through
sending an email. Something like this, you send an email and the body
of the email substitutes a text you use in your site. Igreat apreciate
any help since I couldn't find anything on this topic.

Sure, you can send a message attaching the files you want to update in
your site to an address with a POP3 mailbox and then use a POP3 client
to retrieve and parse the message to extract the files to be updated.

You may want to try this POP3 client class that you can use for that
purpose.

It provides a cool feature that lets you retrieve messages from POP3
mailbox using PHP fopen or file_get_contents functions like this:

file_get_contents('pop3://user:password@xxxxxxxxxxxxxxxxx/1');

http://www.phpclasses.org/pop3class

You can also use this message parser class that lets you process your
messages and extract any files easily.

http://www.phpclasses.org/mimeparser

Take a look at this example that demonstrates how to integrate both
classes easily to parse your message structure:

http://www.phpclasses.org/browse/file/14695.html


I've had to have a perl script reacting to emails and acting on them. I did it using RetchMail (http://open.nit.ca/wiki/?page=RetchMail), which is mindnumbingly fast when you need to download a bunch of emails. As the page says, stupidly fast. As a disclaimer, it's an opensource app maintained by people at my workplace. Still, it's probably the fastest POP3 mail fetcher out there.

Regards, Adam Zey.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux