Score:0

auto forward sender's email using mySQL to lookup up email address of recipient then send

mc flag
don

Here is the scenario. Users of my web site can search for other users who live in the same vicinity. Match results display links which transfer match data to a send message page. The send msg page queries a mySQL database for the real email address of the matched user and substitutes it into the original email.

Is there a simple script to auto forward the original message to the real email address of the matched forum user without any human intervention.

If the site I'm starting gets busy I don't want to be tied up forwarding emails manually. I am totally new at this and don't know the necessary steps or components to accomplish this. I do know some javascript, php, asp etc. Thanks for your advice.

ua flag
There is no way for MySQL to launch an external process (such as mail). You could write a program that checks the database periodically for things to forward and do the forwarding.
don avatar
mc flag
don
Thanks Rick. When the user clicks "send message" it triggers a php script that retrieves the correct address from the database then executes a mailto: request... does anyone know how to do this?
ua flag
Where is the "send message button"? Presumably in a PHP-generated HTML `<form> ... <input type=submit>Send Message ...`? If you don't say otherwise, it goes back to the same PHP script.
don avatar
mc flag
don
form > script > database > script > (hidden) send mail page > confirmation page
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.