|  | Posted by Manuel Lemos on 06/14/05 05:47 
Hello,
 on 06/13/2005 05:43 PM Chuck Anderson said the following:
 >>> I want to use an eMail as a trigger to start a program.
 >>>
 >>> E.g. an eMail-Group: any group-member sends an eMail to a
 >>> group-e-adress  an the Mail is dispatches automatically to all members.
 >>>
 >>> I know there are services like yahougroups who do exactly this, but
 >>> I  wonder wether it's possible to do something like this by my own.
 >>>
 >>> Further purposes could be to trigger any program on a webserver by a
 >>> special trigger-eMail.
 >>>
 >>
 >> That is easy. I do that all the time. Basically you need to assign a
 >> certain address to a mailbox reachable by POP3. Then you keep polling
 >> the mailbox periodically until a new message reaches there to be
 >> redistributed to your mailing list.
 >>
 >> You may want to use this POP3 class for fetching your messages.
 >>
 >> http://www.phpclasses.org/pop3class
 >>
 > Thanks for this.  I've been playing with it for a couple of hours.  I've
 > always wanted to automatically verify new users to a mail list I
 > created.  I'm sure you know what I mean.  When they sign up I send an
 > automated email which they must respond to (leaving the subject
 > intact).  This is going to work great (using cron to poll).
 >
 > Have you any clever method for pulling lines out of the headers array?
 > Using explode at the :'s will not work because of the Date line (time
 > contains :'s), so I do this:
 > (just curious to know if there is a simpler way to do it)
 
 
 Sure, strtok($line,": "); to pick the header name, and then strtok("");
 to pick the header value . Just keep in mind that header line that start
 with space or tab are continuation of previous header line value.
 
 
 
 --
 
 Regards,
 Manuel Lemos
 
 PHP Classes - Free ready to use OOP components written in PHP
 http://www.phpclasses.org/
 
 PHP Reviews - Reviews of PHP books and other products
 http://www.phpclasses.org/reviews/
 
 Metastorage - Data object relational mapping layer generator
 http://www.meta-language.net/metastorage.html
  Navigation: [Reply to this message] |