Correctly formatting wp_Mail's $headers from an input
-
My client wants to be able to edit the email headers, so I added an edit page for this, and added them as options, but the emails have stopped sending now.
The previous (and working) format was this:
$headers = 'From: LoadPress <[email protected]>' . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
But when I added the option to it:
$headersF = 'From: LoadPress <[email protected]>' . "\r\n"; $headers = 'From: '.get_option('LoadPressEmailEditor_FromValue', $headersF)."\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
It stopped working, and no email is sent now.
Any ideas as to what I have done?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Correctly formatting wp_Mail's $headers from an input’ is closed to new replies.