是否可以在Wordpress中为联系人表格提供自定义地址



是否可以将Wordpress联系人表单发送到自定义后端服务器,而不是发送到电子邮件?

例如http://localhost:3000我的nodejsexpress服务器托管在哪里?

在wp-config.php中添加以下设置-因此wp_mail((将起作用。

define( 'SMTP_HOST', 'server.a2hosting.com' );  //  Check your hosting  company 
define( 'SMTP_AUTH', true );
define( 'SMTP_PORT', '465' );
define( 'SMTP_SECURE', 'ssl' );
define( 'SMTP_USERNAME', 'user@yourdomain.com' );  // Username for SMTP authentication
define( 'SMTP_PASSWORD', 'password' );          // Password for SMTP authentication
define( 'SMTP_FROM',     'user@yourdomain.com' );  // SMTP From address
define( 'SMTP_FROMNAME', 'Yourfirstname YourLastname' );         // SMTP From name
use following code in your form template or function.php , you may need custom function to pull each field data 
wp_mail("recipient@example.com", "Subject", "Message");

最新更新