I have a custom email form i made in php and that works the way it should.
The problem is that its sending with my Host servers email
example : username@Hostservername.com
I have emails set up on the Host, like the cliche' = contact@domain.com , orders@domain.com
I made the php script with the $from to be the one i want. but its defaulting to the server email .
i send the mail with
Code: Select all
$to = $_POST['user_email'] ;
$from = 'contact@mydomain' ; <-- (i use a real domain here)
$subject = 'Thank You for your Inquiry' ; <-- (or whatever i will put as subject)
$message = $message_response;
// Send the message
$ok3 = @mail($to, $from, $subject, $message);
?>The mail goes through and the To: field is correct.
the From: field doesnt say 'contact@mydomain.com' it says 'myusername@Host/servername.com.
the subject says = 'contact@mydomain.com' instead of the $subject string.
the message goes through correct.
and the $subject line ..ends up at the bottom of the message like a footer.
odd , very odd ..it smells fishy , someone may be trying to access the main terminal Scotty.
any suggestions?