Support » Plugin: Contact Form 7 » [Plugin: Contact Form 7] Sending Mail – Adding PHP INSERT Statement?

  • I would like to add a php INSERT statement to my mail function in order to save all form submits into a table in my database. Can anyone tell me where in my plugin folders the code for the mail function is located? I know how to add the INSERT statement, I just need to know where to place it so that it will insert the information from the form upon successful submission. Wherever the form sends the e-mail out is where I’d like to insert into the database. Can anyone help please?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Takayuki Miyoshi



    but there is already an extension plugin for that.

    This extension is great, but I have a client who is not able to navigate on the backend of WordPress very well. I need a way to create a customized admin section for them that will allow them to view the messages that is SUPER user friendly for them. The plugin saves the data from the form submission in a VERY confusing way, and this make sit hard for me to create the customized admin page for the user.

    Where in this code (in includes/classes.php) is the part where it submits the form specifically? I see where it validates and where it sends the message, but I need to know where it submits the form successfully I guess because I want to place the insert statement there and pull the values from the form submission. The plugin is a little confusing for me. Is there any way you can help a little? You are the creator of the plugin, so you would best be able to tell me where to place what. 🙂 I know you are very busy and I would greatly appreciate the help if you have the time!

    Plugin Author Takayuki Miyoshi


    Look into includes/controller.php.

    I think that using wpcf7_mail_sent action hook is the best fit for your needs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Contact Form 7] Sending Mail – Adding PHP INSERT Statement?’ is closed to new replies.