test email is working but not sending email with wp mail

Closed. This question is off-topic. It is not currently accepting answers.Questions that are too localized (such as synt

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 5 years ago.

Improve this question
wp_mail($emails, 'New Contact Enquiry | ' . $subject, $message, $headers, $attachments)

but getting this error.

WP_Error Object ( [errors] => Array ( [2] => Array ( [0] => SMTP Error: data not accepted. ) ) [error_data] => Array ( [2] => Array ( [to] => Array ( [0] => [email protected] ) [subject] => New Contact Enquiry | Government Project Enquiry [message] =>

Sender Email :[email protected]

Sender Contact: :21312312312

Message :tersrtrt

[headers] => Array ( [Reply-To] => [email protected] [MIME-Version] => 1.0 ) [attachments] => Array ( [0] => ) ) ) )

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 5 years ago.

Improve this question
wp_mail($emails, 'New Contact Enquiry | ' . $subject, $message, $headers, $attachments)

but getting this error.

WP_Error Object ( [errors] => Array ( [2] => Array ( [0] => SMTP Error: data not accepted. ) ) [error_data] => Array ( [2] => Array ( [to] => Array ( [0] => [email protected] ) [subject] => New Contact Enquiry | Government Project Enquiry [message] =>

Sender Email :[email protected]

Sender Contact: :21312312312

Message :tersrtrt

[headers] => Array ( [Reply-To] => [email protected] [MIME-Version] => 1.0 ) [attachments] => Array ( [0] => ) ) ) )

Share Improve this question asked Jun 10, 2019 at 9:54 khankhan 214 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

Check with your email host regarding the "data not accepted" error.

This could be for a number of reasons. Based on what you posted, the most likely reason is trying to use a different "from" address than the account's actual address. For example, using the "[email protected]" account to send from "[email protected]". In other words, "[email protected]" as a sender is being rejected.

Error due to headers section of email body.I have removed the headers="MIME-VERSION" and its working fine.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745419883a4626918.html

相关推荐

  • test email is working but not sending email with wp mail

    Closed. This question is off-topic. It is not currently accepting answers.Questions that are too localized (such as synt

    14小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信