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 questionwp_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 questionwp_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 badges2 Answers
Reset to default 0Check 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
评论列表(0条)