[thelist] Re: starting script when email is received

Dean Mah dmah at shaw.ca
Mon Mar 11 17:50:01 CST 2002


Daniel Farkas writes:

> >In moment of stupidity I promissed  to my friend that he'll get his own,
> >fully customizable mailing group.
> >When somebody posts mail to servers's address that mail should be posted to
> >all subscribers instantly.
> >How can I invoke my php script on email arrival?
> >Is it possible at all?
>
> ...
>
> All of your solutions are fine and dandy, but you are missing the point.
> Probably its my fault, I wasn't precise enough.
> What if I want small, low key mailing group on some free web server with
> only ftp access, using mail account on server where I have only acces to my
> mailbox.
> Good example wood be setting up mailing group on
> http://members.evolt.org/myusername/ with mail address, say,
> myusername at yahoo.com.
> So, I repeat, is it possible at all?


The only way that I can see this working is if you can set your mail
account to forward e-mail to a server where you have more control,
i.e., where you would be able to kick off a script.  I think that
Yahoo lets you forward e-mail to another account, or used to.  You
could forward your e-mail to the other server and then set up a
.forward file or a procmail recipe to send the e-mail to a script.

Another way you could go, although less immediate, is to "fetch" your
e-mail periodically with a script from the mail server and then send
it out from your script server.  Fetching could be done with a POP or
IMAP API if the mail server supports it or you try sending HTTP
requests if it is Web mail.

Dean



More information about the thelist mailing list