I am using Mail() in PHP and as of 4/1/2020 all my site has stopped working because of: " Customers emails can be rejected by our SMTP server because it does not comply with the defined standards from RFC5321 and RFC5322. 1. The header of your e-mail must contain a valid "Date:" entry according to RFC2822: 2. The following field types must be unique: "Date:", "From:", "Sender:", "To:", "CC:", "BCC:", "Subject:" 3. If the above field types are included, they must not be empty and have to be syntactically correct Note: The field types "To:", "CC:" and "BCC:" can, of course, contain several recipients."
do you have any Example how this is done ?
my original code which used to work is :
$to = "awk_grep@yahoo.com";
$subject = "Who are You?.";
$CC = "No CC";
$BC = "No BC";
$from="DO_NOT_REPLY";
$headers .= "From: $whoareyou\n";
$headers .= "Date: $hdrdate\n";
$headers .= "X-Sender: $from\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-Mailer: PHP\n";
$headers .= "Content-type: text/html; charset=iso-10859-1\r\n";