Problem solve Get help with specific problems with your technologies, process and projects.

E-mail notification for database record additions

MySQL expert Mike Hillyer recommends using a combination of a trigger and a user-defined function in order to setup automatic e-mail notification of record additions.

How can I set up my MySQL 4.0 database so that I get e-mail notification each time a record is added? Is there a way to do is using a shell or PHP script?

The simplest way is to add an e-mail send to the application adding the data. In MySQL 5.0, you could use a combination...

of a trigger and a user-defined function (UDF) to do this, with the UDF calling some form of C function for sending email.

This was last published in April 2006

Dig Deeper on Linux servers



Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.