0

i am trying to add from that shows a email i enter but it shows up with the email the server i use CGI-Mailer i have googled this and have not found a way that works this is my code.

<?php
$to = "a@email.com";
$subject = "Test mail HTML";

$headers = "From: a@email.com" . "\n";
$headers = "Reply-To: a@email.com" . "\n";
$headers = "X-Mailer: PHP/".phpversion() . "\n";
$headers = "Content-type:text/html;charset=UTF-8" . "\n";

$message = 'a message';

mail($to, $subject, $message, $headers); 

echo "Mail Sent to: $to";
?> 

this all works other than showing up as a different email

thanks for any help!

0 Answers0