Quantcast
Channel: WordPress.org Forums » [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin] Support
Viewing all articles
Browse latest Browse all 5005

Duplicate Mime Version Headers

$
0
0

Replies: 0

It seems the plugin indiscriminately sets a second mime version header even if it already exists. for many servers this might be fine, but for some it is not and then throw errors like so
SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: Transaction failed: Duplicate header 'MIME-Version'.

i.e, i simply (programatically) send the following email – the variables are of course replaced with whats appropriate – a second Mime-Version header gets added by WP Mail SMTP


$headers   = array();
$headers['mime'] 	= "MIME-Version: 1.0";
$headers['content'] = "Content-type: ".$mail_message['type']."; charset=".$mail_message['charset']."";
$headers['from'] 	= "From: ".$from_name." <".$from_address.">";
$headers['mailer'] 	= "X-Mailer: PHP/".phpversion();
/* implode */
$headers   			= implode("\r\n", $headers);

/*
	send the email
*/
$sending_mail = wp_mail($recipient, $subject, $message, $headers);

any advise ?


Viewing all articles
Browse latest Browse all 5005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>