I have a page on my wordpress site that has some fields to be filled by visitor. On the click event of 'submit' button, all the details filled by visitor should be mailed to the wordpress admin.

I got to know how to Send automatic mail to Admin when user/member changes/adds profile

but i don't have anything to do with the profiles right now. I want to send a mail to wp admin simply on button-click. Any help will be appreciated.

  • 1
    You can achieve this using WordPress AJAX codex.wordpress.org/AJAX_in_Plugins. Try it and let us know if you face any problem. Commented Apr 5, 2013 at 6:50
  • You are welcome, also post your working answer here and accept it so that it can help others. Commented Apr 5, 2013 at 7:29

1 Answer 1


I could not really work out with the ajax with plugins things. Not so good with it still. :( So i simply used the function get_bloginfo('admin_email') to obtain the admin's email address. Using mail() function, the mails are sent to the obtained email address on click of the button.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.