how to change default mailed by : address in php mail()
Posted
by testkhan
on Stack Overflow
See other posts from Stack Overflow
or by testkhan
Published on 2010-05-25T19:57:24Z
Indexed on
2010/05/25
20:01 UTC
Read the original article
Hit count: 130
php
i have the following code
$subject = "Subject Here";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From: Domain Name <[email protected]>' . "\r\n";
$to = $email;
$body = '
My Message here
';
mail($to, $subject, $body, $headers);
and it send mail correctly but when i see details in the email in gmail ... it shows
from Domain Name to [email protected] date Tue, May 25, 2010 at 12:41 PM subject my subject here mailed-by mars.myhostingcompany.net
while i want to show my own address in mailed by section so that it should be mydomain.com instead of mars.myhostingcompany.net
© Stack Overflow or respective owner