### [How to Save Contact Form Emails in WordPress Database](https://wpmailsmtp.com/how-to-save-contact-form-emails-in-wordpress-database/)

**Published:** August 8, 2023
**Author:** Hamza Shahid

**Excerpt:** Have you ever wondered how to save emails from your WordPress contact forms into your site's database?

If you're using WordPress, the information entered into a contact form doesn't have to be lost when hitting the submit button.

This tutorial shows you how to improve your email and form management by utilizing WP Mail SMTP for email logging and WPForms Pro for entry storage.

**Content:**

Have you ever wondered how to save emails from your WordPress contact forms into your site’s database?

If you’re using WordPress, the information entered into a contact form doesn’t have to be lost when hitting the submit button. By saving this data, you can have a historical record of communication that can be accessed at any time.

[Save Contact Form Emails in WordPress](https://wpmailsmtp.com/pricing/)

This tutorial shows you how to improve your form and email management by utilizing WP Mail SMTP for email logging and the premium version of WPForms for entry storage.

### Why Save Contact Form Emails in the WordPress Database?

Emails submitted using a contact form should be saved in your WordPress database for easy access. The importance of this strategy is highlighted by a few important reasons, such as:

- **Data Security —** You may avoid losing important information by storing your emails in WordPress’s database. Emails sent via the contact form will be saved in case they are lost in transit or deleted inadvertently.
- **Business Continuity —** Contact form emails often contain crucial client requests or consumer feedback; keeping these in a database helps keep business running smoothly. In the event of email service disruptions, this data archive is invaluable.
- **Email Analytics —** You may find a treasure trove of information about your customers’ communication habits within the stored emails in your WordPress database. Based on customer responses and questions, you can adjust your business tactics accordingly.
- **Communication Management —** Keeping a log of contact form emails allows for more organized communication management by facilitating tracking, searching, and sorting. When dealing with a large amount of mail, this is invaluable.
- **Resending Failed Emails —** You may effortlessly resend any emails returned as undelivered with WP Mail SMTP’s built-in resending capability. This will improve your customer service by ensuring that critical communications are never lost in transit.

Contact form emails can be stored in the WordPress database, but this is just the beginning of their usefulness. The next step is understanding how to do it effectively.

## How to Save Contact Form Emails in WordPress Database

There are 2 simple ways to save contact form emails in your WordPress database: with and email logging plugin, or using your form builder plugin.

Here’s how to use both methods to keep track of all your contact form emails.

### Method 1: Store Contact Form Emails in Email Logs With WP Mail SMTP

You must have the WP Mail SMTP Pro license or higher to enable complete email logging on your WordPress website. Follow the steps below to get started.

#### 1. Install and Activate WP Mail SMTP

To log your WordPress emails, we will install the [WP Mail SMTP plugin](https://wpmailsmtp.com/pricing/). Over 3 million WordPress users rely on WP Mail SMTP to increase email delivery and tracking.

You can get the .zip file for installing the WordPress plugin from your [WP Mail SMTP account](https://wpmailsmtp.com/account/). It’s available in the **Downloads** tab.

![Download WP Mail SMTP ](https://wpmailsmtp.com/wp-content/uploads/2021/02/download-wp-mail-smtp-e1612521494497.png "Download WP Mail SMTP ")

The next step is to log in to WordPress and upload the .zip file to the **Plugins** page. If you need assistance, check out [how to install a plugin in WordPress](https://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/).

![Install WP Mail SMTP](https://wpmailsmtp.com/wp-content/uploads/2021/02/install-wp-mail-smtp.png "Install WP Mail SMTP")

The WP Mail SMTP Setup Wizard will launch as soon as the plugin is activated on your WordPress site.

#### 2. Choose Your Email Service Provider

We may now use the Setup Wizard to configure your preferred SMTP service. Click the **Let’s Get Started** button to begin.

![Click the Let's Get Started button](https://wpmailsmtp.com/wp-content/uploads/2021/05/wp-mail-smtp-setup-wizard.png "Click The Let's Get Started Button")

WP Mail SMTP works with various paid and free email providers. To select a mailer, click its name on the following screen.

![Choose SMTP Mailer](https://wpmailsmtp.com/wp-content/uploads/2023/07/Choose-SMTP-Mailer.png)

Once you’ve decided on a mail provider, you can proceed with the setup by visiting our documentation in the table below.

Mailers available in all versionsMailers in [WP Mail SMTP Pro](https://wpmailsmtp.com/pricing/)[SendLayer](https://wpmailsmtp.com/docs/how-to-set-up-the-sendlayer-mailer-in-wp-mail-smtp/)[Amazon SES](https://wpmailsmtp.com/docs/how-to-set-up-the-amazon-ses-mailer-in-wp-mail-smtp/)[SMTP.com](https://wpmailsmtp.com/docs/how-to-set-up-the-smtp-com-mailer-in-wp-mail-smtp/)[Microsoft 365 / Outlook.com](https://wpmailsmtp.com/docs/how-to-set-up-the-outlook-mailer-in-wp-mail-smtp/)[Brevo](https://wpmailsmtp.com/docs/how-to-set-up-the-sendinblue-mailer-in-wp-mail-smtp/)[Zoho Mail](https://wpmailsmtp.com/docs/how-to-set-up-the-zoho-mailer-in-wp-mail-smtp/)[Google Workspace / Gmail](https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/)[Mailgun](https://wpmailsmtp.com/docs/how-to-set-up-the-mailgun-mailer-in-wp-mail-smtp/)[Postmark](https://wpmailsmtp.com/docs/how-to-set-up-the-postmark-mailer-in-wp-mail-smtp/)[SendGrid](https://wpmailsmtp.com/docs/how-to-set-up-the-sendgrid-mailer-in-wp-mail-smtp/)[SparkPost](https://wpmailsmtp.com/docs/how-to-set-up-the-sparkpost-mailer-in-wp-mail-smtp/)[Other SMTP](https://wpmailsmtp.com/docs/how-to-set-up-the-other-smtp-mailer-in-wp-mail-smtp/)When an email is sent, most logging plugins will record it as either **Sent** or **Failed**. However, they can’t give you any information about what happened after that.

If you use WP Mail SMTP for logging WordPress emails, you will have more visibility into the delivery status of your messages.

With WP Mail SMTP, you can unlock two additional status reports: **Unconfirmed** (Waiting) and **Confirmed** (Delivered), that inform you of the following things:

- **Sent —** This indicates that WordPress generated and sent the email successfully.
- **Failed —** If an email status is “failed,” it was never sent. This can appear if your SMTP server is down or if there is a problem with your server’s setup.
- **Confirmed —** When an email is confirmed, it means that it was successfully sent and delivered to the receiver’s inbox.
- **Unconfirmed —** Unconfirmed indicates that the email was successfully delivered but that WP Mail SMTP is still awaiting the status.

**Unconfirmed** and **Confirmed** email services are supported by the following email providers. Here’s a chart to show each status and the mailers that support them:

Email ServiceFailedSentWaiting / UnconfirmedDelivered / Confirmed[SendLayer](https://sendlayer.com)✓✓✓✓[SMTP.com](https://wpmailsmtp.com/go/smtp/ "SMTP.com")✓✓✓✓[Brevo](https://wpmailsmtp.com/go/brevo/ "Brevo(Formerly Sendinblue)") (formerly Sendinblue)✓✓✓✓Amazon SES✓✓Google Workspace / Gmail✓✓Mailgun✓✓✓✓Microsoft 365 / Outlook.com✓✓Postmark✓✓✓✓SendGrid✓✓SparkPost✓✓✓✓[Zoho Mail](https://wpmailsmtp.com/go/zoho-mail-3/ "Zoho Mail")✓✓Other SMTP✓✓We advise using WP Mail SMTP with a transactional mailer such as [SendLayer](https://sendlayer.com/), [Brevo](https://wpmailsmtp.com/go/brevo/ "Brevo(Formerly Sendinblue)"), [SMTP.com](https://wpmailsmtp.com/go/smtp/ "SMTP.com"), Mailgun, Postmark, or SparkPost for optimal email tracking.

#### Need a hand?

You can purchase White Glove Setup as an additional service with any of our [WP Mail SMTP licenses](https://wpmailsmtp.com/pricing/) and have our customer support team set up WP Mail SMTP for you.

#### 3. Use the Setup Wizard to Log All Email Content

In Step 2 of the Setup Wizard, you will have the opportunity to select the mailer of your choice and configure its settings.

In Step 3, you can enable email features. Your 4 options are Improved Email Deliverability, Email Error Tracking, Detailed Email Logs, and Instant Email Alerts.

Click on **Detailed Email Logs** to enable it and automatically add options for **Complete Email Reports** and **Weekly Email Summary** (optional).

![Enable detailed email logs](https://wpmailsmtp.com/wp-content/uploads/2021/05/Enable-Email-Features-Logs.png)

For the most accurate results possible, we strongly suggest that you also log the content of any emails that you send out.

On the next screen, you will be able to do this. You will want to check the option: **Store the content for all sent emails**.

![Configuring email logs in WP Mail SMTP](https://wpmailsmtp.com/wp-content/uploads/2021/05/Configure-Email-Logs.png "Configuring Email Logs WP Mail SMTP")

You must do this if you wish to send any of your emails again or save any emails generated by your contact form plugin, such as submission notifications.

Take into account, though, that this will involve storing all email content. This might include data, passwords, and personal details.

On this screen, you may also choose to save email attachments in your WordPress uploads folder, [track when an email is opened](https://wpmailsmtp.com/enable-wordpress-email-tracking/), and track when a link in an email is clicked by enabling the relevant options.

After you have completed this step, the Setup Wizard will conduct a test of your connection and inform you if there are any problems. If all goes smoothly, you will get the below success message.

![Completing the WP Mail SMTP Setup Wizard](https://wpmailsmtp.com/wp-content/uploads/2022/10/setup-wizard-success-message.png "Completing WP Mail SMTP Setup Wizard")

While most of the configuration may be done with the Setup Wizard, in order to modify the webhook and log retention settings, you will need to navigate to **WP Mail SMTP » Settings » Email Log.**

![Access settings for webhooks and the log retention period via email log settings](https://wpmailsmtp.com/wp-content/uploads/2021/05/Email-Logging-Settings.png "Email Logging Settings")

Every email that is sent using the `wp_mail()` function will now be logged, as you have just finished configuring the email logs for WordPress.

#### 4. View WordPress Email Logs

Let’s check the email logs now. To view the email log for WordPress, go to **WP Mail SMTP » Email Log** from your dashboard.

![WordPress email log menu item in WP Mail SMTP](https://wpmailsmtp.com/wp-content/uploads/2021/06/wp-mail-smtp-email-log-e1620911214890.png "WordPress Email Log Menu Item WP Mail SMTP")

You might not have a lot of logs to look at just yet because your installation is new. We will demonstrate what it will appear like when some time has passed.

Let’s begin by sorting the log according to the date. In this example, we’re looking for any emails that failed to deliver on April 20.

You may quickly and easily view the log files for a certain date or range of dates by using the datepicker at the top of the WP Mail SMTP email log.

See how we put it to use in the image below, where we’re trying to find messages posted to our WordPress blog between April 14 and April 21.

![WordPress email log date filtered](https://wpmailsmtp.com/wp-content/uploads/2023/07/WordPress-email-log-date-filtered.png "WordPress Email Log Date Filtered")

We know the first three emails were successfully delivered because our transactional mailer indicates they are **Delivered** with a green circle and checkmark.

A red dot next to one email indicates that it **Failed**. The **View Log** and **Delete** buttons appear when we move the mouse pointer over that line.

![View or delete individual email log](https://wpmailsmtp.com/wp-content/uploads/2021/06/view-delete-email-log.png "View Or Delete Individual Email Log")

Let’s check out the email’s log by clicking the **View Log** button. Each individual log page allows us to:

- **Print** the email log, or save it as a PDF
- **Export** this log as a CSV, EML, or Excel file.

The email log also tells you which plugin generated the email.

![Email log source WP Mail SMTP](https://wpmailsmtp.com/wp-content/uploads/2023/07/Email-log-source-WP-Mail-SMTP.png "Email Log Source WP Mail SMTP")

You can change the recipient address and send the email again by selecting **Resend**. This can be used to [resend new user activation](https://wpmailsmtp.com/wordpress-resend-new-user-email/) and password reset emails.

![Resend emails WP Mail SMTP](https://wpmailsmtp.com/wp-content/uploads/2020/10/resend-email-30.png "Resend Emails WP Mail SMTP")

The log’s complete headers can be viewed by selecting the **Technical Details** dropdown at the bottom of the window for more detailed troubleshooting.

![Email log error](https://wpmailsmtp.com/wp-content/uploads/2021/06/email-log-error.png "Email Log Error")

The recipient in question has reached the Gmail limit for the number of messages they can receive at once. That way, we know it wasn’t an issue with our email service or configuration.

Logs can be printed in either the **Normal** or **Compact** format directly from the log file details page. If you need to save paper or reduce the size of the PDF yet have a substantial log file, the Compact View is a good option.

![Print email log WP Mail SMTP](https://wpmailsmtp.com/wp-content/uploads/2023/07/Print-email-log-WP-Mail-SMTP.png "Print Email Log WP Mail SMTP")

Let’s return to the main log panel and examine the alternative ways by which we can control WordPress’s email logs.

The email logs can be filtered using the search bar. The list can be further narrowed down by applying more search parameters until the desired result is found.

We have previously applied date filters. The next step is to look at the **Subject and Headers** to check whether any failed login credentials were sent that week.

These search and filtering features make it simple to locate any email and learn whether or not it was sent and delivered.

![Search filters in WP Mail SMTP](https://wpmailsmtp.com/wp-content/uploads/2023/07/Search-filters-in-WP-Mail-SMTP.png "Search Filters WP Mail SMTP")

You can even check out your Email Reports for details about your email open and clickthrough rates using the WP Mail SMTP plugin.

To access it, navigate to the **WP Mail SMTP » Email Reports** menu. You can now check how your emails are doing regarding deliverability within the WordPress dashboard.

![WP Mail SMTP Pro dashboard widget](https://wpmailsmtp.com/wp-content/uploads/2021/04/wp-mail-smtp-pro-dashboard-widget-1.gif)

This makes WP Mail SMTP a valuable tool for keeping track of users, so you can measure their engagement with emails.

Since you may not want to log in to WordPress every day to ensure that your user activation emails are being sent, WP Mail SMTP offers a solution for that as well.

WP Mail SMTP sends out a weekly email summary every Monday, so you can keep an eye out for the success of your email campaigns without accessing WordPress.

![Email summary with statistics in WP Mail SMTP Pro](https://wpmailsmtp.com/wp-content/uploads/2021/08/email-summary-pro-statistics.png "Email Summary With Statistics In WP Mail SMTP Pro")

You can also use Instant Email Alerts that lets you know right away if your website [fails to send an email](https://wpmailsmtp.com/how-to-get-alerts-when-wordpress-emails-fail/) so you can fix the issue.

![An email alert notification](https://wpmailsmtp.com/wp-content/uploads/2022/07/example-email-alert.png "Example Email Alert")

#### 5. Track Email Opens and Clicks

Now that you know your emails are reaching their intended recipients, you should verify whether or not they are being opened and read.

In addition to helping you keep track of WordPress emails, WP Mail SMTP Pro also keeps tabs on how often your HTML emails are opened and clicked on.

If you sell online courses or send newsletters through WordPress, you will find the[ email tracking feature](https://wpmailsmtp.com/enable-wordpress-email-tracking/) to be extremely helpful.

This is easy to do! Just head to **WP Mail SMTP » Settings**. To access your WordPress email log settings, select **Email Log** from the menu.

![Email log settings tab](https://wpmailsmtp.com/wp-content/uploads/2021/07/email-log-settings-tab.png "Email Log Settings Tab")

Next, scroll down and turn on these two options:

- Open Email Tracking
- Click Link Tracking

![Open and click tracking in WordPress](https://wpmailsmtp.com/wp-content/uploads/2021/05/open-click-tracking-wordpress.png)

Open and click tracking data will now be shown next to each individual email log for your viewing convenience.

![WordPress email log opened and clicked](https://wpmailsmtp.com/wp-content/uploads/2023/07/WordPress-email-log-opened-and-clicked.png "WordPress Email Log Opened and Clicked")

You will also be able to view complete open rates and click-through rates in your Email Report if you’re a WP Mail SMTP Pro customer.

![Email Report grouped by subject line](https://wpmailsmtp.com/wp-content/uploads/2021/08/email-report-grouped-subject-line.png "Email Report Grouped By Subject Line")

And that’s it! Now you know how to log your contact form emails.

But what about capturing and storing contact form data in WordPress? You may want to consider using WPForms with WP Mail SMTP.

In this combination, WP Mail SMTP takes charge of ensuring your emails are properly logged and sent, even offering the capability to resend failed emails.

On the other hand, the form builder plugin, WPForms, excels in capturing and storing form data right in your WordPress backend.

This optimizes the saving of contact form emails in WordPress, creating a well-rounded and reliable system for your business communication needs.

### Method 2: Save Contact Form Entries in WPForms

WPForms enables you to save form entries in your WordPress database. This will also enable you to resend email notifications from your admin dashboard.

You will need a [paid WPForms license](https://wpforms.com/pricing) to access your form entries and resend notifications.

#### 1. Use WPForms to Save Form Entries Data

Storing and retrieving form data from the WordPress database is extremely user-friendly with the premium version of WPForms.

Once you’ve installed and activated the form plugin, you can [create a simple contact form](https://wpmailsmtp.com/how-to-make-a-contact-form-with-multiple-email-addresses/) and take advantage of WPForms’ entry storage feature.

While you are working within the drag-and-drop WPForms builder for your contact form, switch to the **Settings » General** menu in the contact form plugin.

![Settings General WPForms](https://wpmailsmtp.com/wp-content/uploads/2023/07/Settings-General-WPForms.png)

Ensure that the box labeled **Disable entry storing information in WordPress** is turned off in the **Advanced** section of the menu.

![WPForms disable storing entry information](https://wpmailsmtp.com/wp-content/uploads/2023/08/WPForms-disable-storing-entry-information.png "WPForms Disable Storing Entry Information")

After you publish your form, test it by finishing and submitting it yourself. This will make a form submission in your WordPress dashboard for you to look at.

Now, in order to view your test entry and other form submissions, navigate to **WPForms » Entries** and select the contact form you created.

![WPForms entries menu](https://wpmailsmtp.com/wp-content/uploads/2023/08/WPForms-entries-menu.png "WPForms Entries Menu")

Upon scrolling down, you can mark your entries as read, add them to your favorites, and even delete the ones you don’t want to keep.

You can also quickly search and add filters to the contact form entries. To find a specific entry, you can even do a broad search by **Any form field** or set conditions.

![Form entries menu](https://wpmailsmtp.com/wp-content/uploads/2023/08/Form-entries-menu.png "Form Entries Menu WPForms")

To view a specific form entry, click **View** in the **Actions** column. From here, you can also **Resend Notifications**.

Remember that you’ll need an email logging plugin like WP Mail SMTP to see the entire contents of any emails sent from your contact form plugin.

![WPForms individual entry](https://wpmailsmtp.com/wp-content/uploads/2023/08/WPForms-individual-entry.png "WPForms Individual Entry")

If you’re collecting payments through your forms, you can access the details through **WPForms » Payments** for a visual depiction.

In the **Payments** section, alongside sales and subscriptions, you will also find information about [coupons used on your forms](https://wpforms.com/coupon-code-field/).

#### 2. Access Form Data in WordPress Database

When WordPress is first installed, it automatically generates a database for you even though you might not be able to see it on the frontend.

The WPForms plugin will automatically save any data submitted to the native WordPress php database in four tables. They are as follows:

- **wp\_wpforms\_entries —** This database table stores the information in the fields (values) of your entries.
- **wp\_wpforms\_entry\_meta —** This table’s metadata includes entry IDs and creation and modification dates.
- **wp\_wpforms\_entry\_fields —** This table stores the information entered into your forms in an encoded format.
- **wp\_wpforms\_tasks\_meta —** This table is used to record information about tasks that are carried out in the background.
- **wp\_wpforms\_payments —** This table records data like the status, amount, any discounts applied, currency, payment gateway, and transaction ID.
- **wp\_wpforms\_payment\_meta —** This table contains extra payment information, such as the customer’s IP address and other internal data.

After installing WordPress, most web hosts will give you simple web programs like **phpMyAdmin** to manage your MySQL database.

[Bluehost](https://wpmailsmtp.com/go/bluehost/ "BlueHost") users can access the phpMyAdmin database server by going to the bottom of the homepage and clicking **Helpful Links » Advanced » phpMyAdmin**.

![How to access WordPress database](https://wpmailsmtp.com/wp-content/uploads/2023/07/How-to-access-WordPress-database.jpg)

Choose the database that contains your WordPress installation and then navigate to the **wp\_wpforms\_entries** table using phpMyAdmin.

![WPForms entries table WP database](https://wpmailsmtp.com/wp-content/uploads/2023/07/WPForms-entries-table-WP-database.png "WPForms Entries Table WP Database")

There are many things you can do here. You can read this [phpMyAdmin for WordPress database management beginner’s guide](http://www.wpbeginner.com/beginners-guide/beginners-guide-to-wordpress-database-management-with-phpmyadmin/) for additional information.

### Next, Export and Save Your Contact Form Emails

Now that you’ve learned how to save contact form emails and form entries in the WordPress database, it may also be a good time to dive into our documentation to learn [how to export and save contact form email logs](https://wpmailsmtp.com/docs/how-to-export-email-logs/).

[Save Contact Form Emails in WordPress](https://wpmailsmtp.com/pricing/)

Ready to fix your emails? [Get started today](https://wpmailsmtp.com/pricing) with the best WordPress SMTP plugin. If you don’t have the time to fix your emails, you can get full White Glove Setup assistance as an extra purchase, and there’s a 14-day money-back guarantee for all paid plans.

If this article helped you out, please follow us on [Facebook](https://facebook.com/wpmailsmtp) and [Twitter](https://twitter.com/wpmailsmtp) for more WordPress tips and tutorials.

**Categories:** WordPress Tutorials

**Tags:** contact form, email logging, entry storage, save email in wp, wordpress emails, wpforms

---

