By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,748 Members | 1,506 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,748 IT Pros & Developers. It's quick & easy.

incoming emails

P: n/a
Rod
Hi,

sometimes, when an action is done on my web site, i send an email to another
application.
This application send me automatically a confirmation by email with an
auto-generated number.

How can i automatically get the email to parse it and save this number in a
table?

Do I need a specific mail server that starts a task when it receives an
email?
Suppose I install this mail server, how can I communicate the email content
to a php script (so it can parse the email and save the number in a
table)???

Maybe I can't do that with and need to use a perl script?? So the mail
server run the perl script with the email content??

Thanks you for your help because i am lost!

Rodolphe.

Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Fri, 17 Oct 2003 12:34:42 +0200, Rod hammered his head on the keyboard
and somehow managed to type:
This application send me automatically a confirmation by email with an
auto-generated number.

How can i automatically get the email to parse it and save this number in a
table?

Do I need a specific mail server that starts a task when it receives an
email?
Most mail servers (under Linux at least) can pass an email to a script.
Suppose I install this mail server, how can I communicate the email
content to a php script (so it can parse the email and save the number
in a table)???
If you have the command line binary installed just use something like:

incomingaccount | php /home/someone/php-email.php

and send email to in*************@yourdomain.com
Maybe I can't do that with and need to use a perl script?? So the mail
server run the perl script with the email content??
The same applies, just put the perl script in the mail server setting file
(e.g. /etc/aliases for sendmail or exim).

Note Sendmail can be very tricky in where it will run processes from.
Thanks you for your help because i am lost!


You may also be able to do this with a .redirect file in the home dir of a
user who reads this account.
Or finally, you could put these emails in to a POP3 account and have a
script run every X minutes from a cron job that downloads the POP3 mail
(using the IMAP functions in PHP).

Cheers,
Andy
Jul 17 '05 #2

P: n/a
Rod wrote:
sometimes, when an action is done on my web site, i send an email to another
application.
This application send me automatically a confirmation by email with an
auto-generated number.

How can i automatically get the email to parse it and save this number in a
table?

Do I need a specific mail server that starts a task when it receives an
email?
Suppose I install this mail server, how can I communicate the email content
to a php script (so it can parse the email and save the number in a
table)???


I'm just playing with this for the first time. The imap functions are working
well for me so far. I plan to run a cron job every hour or so to check for and
process new mail.

http://ca3.php.net/manual/en/ref.imap.php

Shawn
--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com
Jul 17 '05 #3

P: n/a
Rod
Hi all,

thanks you both for your answers.
i will have a look to your solutions.
I think I need time to understand, because i don't exactly know what is
POP3, IMAP etc etc.

Thanks you again

Rodolphe
"Shawn Wilson" <sh***@glassgiant.com> wrote in message
news:3F***************@glassgiant.com...
Rod wrote:
sometimes, when an action is done on my web site, i send an email to another application.
This application send me automatically a confirmation by email with an
auto-generated number.

How can i automatically get the email to parse it and save this number in a table?

Do I need a specific mail server that starts a task when it receives an
email?
Suppose I install this mail server, how can I communicate the email content to a php script (so it can parse the email and save the number in a
table)???
I'm just playing with this for the first time. The imap functions are

working well for me so far. I plan to run a cron job every hour or so to check for and process new mail.

http://ca3.php.net/manual/en/ref.imap.php

Shawn
--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com

Jul 17 '05 #4

P: n/a
I noticed that Message-ID: <bm**********@home.itg.ti.com> from Rod
contained the following:
sometimes, when an action is done on my web site, i send an email to another
application.
This application send me automatically a confirmation by email with an
auto-generated number.

How can i automatically get the email to parse it and save this number in a
table?


Could PHP on the website not do it all?

--
Geoff Berrow
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.