wp_mail script with jQuery post

Basically, you can use JavaScript to post to a WordPress function, then the WordPress function can invoke wp_mail() to send the message.

A great place to start would be the useful AJAX in Plugins article on the Codex. It walks you through all the steps required to add your JavaScript on the front-end, your PHP on the back-end, and everything you need to do to tie the two together.

Leave a Comment