联系 Form 7 SMS 与 twilio 的集成

Contact Form 7 SMS integration with twilio

如何设置,以便在有人填写表格时我可以发送短信?我正在使用 https://www.twilio.com 发送短信。 提交表格时,我应该在哪里包含联系表格 7 中的操作?在此感谢任何帮助,谢谢!

您可以连接到 CF 7 进程。

查看 here, here and here 了解更多信息和一些操作示例。

连接到 where/after 发送的邮件可能对您想要执行的操作很有趣。

这 1 做对了,现在剩下的是尝试回显提交给短信的信息。可以直接用echo吗?

在过滤器更改时也注意到了这一点,不确定是否受到影响 http://contactform7.com/2015/05/18/contact-form-7-42-beta/

add_action( 'wpcf7_mail_sent', 'your_wpcf7_mail_sent_function' );

function your_wpcf7_mail_sent_function() {
   // Get the PHP helper library from twilio.com/docs/php/install
   require_once( get_stylesheet_directory() . '/twilio-php-master/Services/Twilio.php'); // Loads the library

   $account_sid = 'AC914e20c15791698c1d86cfc297e30f64'; 
   $auth_token = '1e962df32508157599929e545033c869'; 
   $client = new Services_Twilio($account_sid, $auth_token); 

   $client->account->messages->create(array( 
       'To' => "+60167833549", 
       'From' => "+13479604387", 
       'Body' => "form submited",   
   ));

}

请使用这个 WordPress 插件

https://wordpress.org/plugins/really-simple-sms-api/

谢谢

这是一个免费插件,用于从 wordpress 联系表 7 发送短信通知:

https://wordpress.org/plugins/cf7-international-sms-integration/

您可以使用任何短信网关短信配置此插件 API 例如。 Spring边。