如何在不发送电子邮件的情况下提交联系表格?
How to submit a Contact Form without sending email?
我在我的 WordPress 网站上安装了 Contact Form 7 和 Contact Form DB,但没有也不想安装邮件服务器。此时我可以从Contact Form DB中收集表单信息,请问有什么方法可以关闭提交按钮的邮件功能吗?
将此添加到 Additional Settings
部分会使其停止邮寄。
demo_mode: on
将此代码添加到您的插件或 functions.php
add_filter('wpcf7_skip_mail', 'yourname_wpcf7_skip_mail');
function yourname_wpcf7_skip_mail()
{
return true;
}
对我有用。
可能有一些变化。例如,在当前版本设置 demo_mode: on
将导致数据库不被表格填充。
请改用 skip_mail: on
。
来自官网:
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.
我在我的 WordPress 网站上安装了 Contact Form 7 和 Contact Form DB,但没有也不想安装邮件服务器。此时我可以从Contact Form DB中收集表单信息,请问有什么方法可以关闭提交按钮的邮件功能吗?
将此添加到 Additional Settings
部分会使其停止邮寄。
demo_mode: on
将此代码添加到您的插件或 functions.php
add_filter('wpcf7_skip_mail', 'yourname_wpcf7_skip_mail');
function yourname_wpcf7_skip_mail()
{
return true;
}
对我有用。
可能有一些变化。例如,在当前版本设置 demo_mode: on
将导致数据库不被表格填充。
请改用 skip_mail: on
。
来自官网:
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.