admin管理员组文章数量:1327925
wp_mail only sends emails to gmail and i receive emails only on gmail inbox but in dedicated servers couldnt send recieve anything even as spam followed data works well only to gmail
add_filter( 'wp_mail_content_type', array( $this, 'set_html_mail_content_type' ) );
$to = [email protected];
$subject = 'test';
wp_mail( $to, $subject, 'body');
remove_filter( 'wp_mail_content_type', array( $this, 'set_html_mail_content_type' ) );
wp_mail only sends emails to gmail and i receive emails only on gmail inbox but in dedicated servers couldnt send recieve anything even as spam followed data works well only to gmail
add_filter( 'wp_mail_content_type', array( $this, 'set_html_mail_content_type' ) );
$to = [email protected];
$subject = 'test';
wp_mail( $to, $subject, 'body');
remove_filter( 'wp_mail_content_type', array( $this, 'set_html_mail_content_type' ) );
Share
Improve this question
asked Jul 17, 2020 at 10:41
user191790user191790
1
1
- How have you configured WordPress to send emails? Are you using the default, which is a local SMTP server running on your WordPress server I think? How is that set up to route onward email? Is the from address you're using on a domain that's set up for SPF i.e. it is likely to be flagged as spam if it's sent from the wrong servers? – Rup Commented Jul 17, 2020 at 11:36
1 Answer
Reset to default 0Welcome to WPD stack exchange.
as I am see its look like sometimes we have forgot to add some basic need and function not working properly.
Please try with header parameter:
$headers[] = 'Content-type: text/plain; charset=utf-8';
$headers[] = 'From:' . "[email protected]";
Also, you can use Easy WP SMTP and enable debugging and/or set that up to use SMTP. If something like GMail works then you'll know it is a server setting and not this code.
本文标签: wp mailwpmail only sends emails to gmail
版权声明:本文标题:wp mail - wp_mail only sends emails to gmail 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742253566a2441208.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论