I've got a client that's using Wordpress for any Content management systems. He wants not-registered customers to have the ability to submit content. It is a form which has the next fields:
Then your message could be published on the website (like a comment) which message/comment would then be e-mailed towards the Friend's current email address. Therefore the email would seem like so:
Your title stated something in regards to you. Is not that awesome?
Blah blah blah blah blah and etc.
How difficult will it be to do this and when it's possible, can someone please point me within the proper direction? I figure you will find fields I have to increase the comment form which I'm able to determine by myself. It is the whole delivering the particular comment within an email to that particular current email address that's leading to issues for me personally.
Produce a new comments template together with your extra fields. See more concerning how to do that in the Codex.
Give a hook for that 'comment_post' action. It's defined around line 997 of comment.php. At this time, the comment will happen to be placed in to the database. You are able to send your email here while using
wp_mail function defined around line 254 of pluggable.php.
If you wish to perform some preprocessing around the comment text, 'pre_comment_on_post' may be your best choice. It's defined around line 34 of wp-comments-post.php.