chunchiu Chan
chunchiu Chan

Reputation: 199

How to submit a Contact Form without sending email?

I have Contact Form 7 and Contact Form DB installed on my WordPress site, but don't and don't want to have a mail server. At this moment, I can collect form information from Contact Form DB, so is there any ways to disable the mailing function of a submit button?

Upvotes: 4

Views: 6959

Answers (3)

ado387
ado387

Reputation: 333

There may have been some changes. For example, on current version setting demo_mode: on will result in database not being filled with forms. Use skip_mail: on instead.

From the official website:

The skip_mail setting works in the almost same manner as the demo_mode, but the skip_mail skips the mail sending only. Unlike demo_mode, skip_mail doesn’t affect other activities like storing messages with Flamingo.

Source: https://contactform7.com/additional-settings/

Upvotes: 2

Duy Hoang
Duy Hoang

Reputation: 552

Add this code to your plugin or functions.php

add_filter('wpcf7_skip_mail', 'yourname_wpcf7_skip_mail');
function yourname_wpcf7_skip_mail()
{
return true;
}

It works for me.

Upvotes: 5

vrajesh
vrajesh

Reputation: 2942

Adding this into the Additional Settings section makes it stop mailing. enter image description here

demo_mode: on

Upvotes: 6

Related Questions