I am new to wordpress, I just installed wordpress on my godaddy server. I want to create a form on wordpress page where user will enter the details, name and password. when the user clicks on submit button of form, I want wordpress to send me an email with the details entered by user in the form. Please help me with this.
Leave a Reply
You must be logged in to post a comment.
I think the best solution would be to use a plugin. There are many plugins that help you create contact forms that would also send you an email with the details.
Contact Form 7 is simple to set up and use.
I hope that helps.
You should use wp_mail() function: http://codex.wordpress.org/Function_Reference/wp_mail
There are some plugins, not sure if you want that. But if you don’t you can do it on your own.
If you want to do it by yourself:
This is the file that gets called by the request (usually an AJAX request):
Notes:
I download it manually (PEAR Mail-1.2.0.tgz)
And then install it (http://code.rawlinson.us/2012/02/install-php-pear-on-windows-7.html)
I move the contents of the .tgz to /PHP/pear, just move it there, and somehow it worked !
It was giving me an error, so I installed Net_SMTP (pear install Net_SMTP)