Yeodan Posted May 2, 2009 Share Posted May 2, 2009 $subject = 'Mortal Ascension activation mail'; $message = 'some link goes here 2'; $headers = 'From: [email protected]' . "\r\n" . "Reply-To: [email protected]" . "\r\n"; mail($mail, $subject, $message, $headers); how do I change the name that appears when receiving the mail? atm this is [email protected] it's supposed to be Mortal Ascension Link to comment https://forums.phpfreaks.com/topic/156528-solved-setting-a-name-header-for-mails/ Share on other sites More sharing options...
kenrbnsn Posted May 2, 2009 Share Posted May 2, 2009 The format of the "From" line should be Name <address> The Name can be quoted so you can change your code to <?php $subject = 'Mortal Ascension activation mail'; $message = 'some link goes here 2'; $headers = 'From: "Mortal Ascension" <[email protected]>' . "\r\n" . "Reply-To: [email protected]" . "\r\n"; mail($mail, $subject, $message, $headers); ?> Ken Link to comment https://forums.phpfreaks.com/topic/156528-solved-setting-a-name-header-for-mails/#findComment-824217 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.