Jump to content

[SOLVED] mail "FROM" php


sungpeng

Recommended Posts

<?php
mail("[email protected]", "$emailsubject", "Dear $fname $lname,
Thank you for registering. Below you will find your username and password that will let you log in and begin to enter
rental listings.
Username: $email
Password: $newpass
", "FROM:sgfair.com");
?>

 

Hi the above script will sent an e-mail to the [email protected]. When it sent over an e-mail to another person, it's FROM "sgfair.com" ([email protected]). Can the FROM just show "sgfair.com" without the [email protected]?

 

Link to comment
https://forums.phpfreaks.com/topic/153294-solved-mail-from-php/
Share on other sites

try adding some headers

$headers = 'From: sgfair.com <[email protected]>' . "\r\n";
mail("[email protected]", "$emailsubject", "Dear $fname $lname,
Thank you for registering. Below you will find your username and password that will let you log in and begin to enter
rental listings.
Username: $email
Password: $newpass
", $headers);

Scott.

 

Link to comment
https://forums.phpfreaks.com/topic/153294-solved-mail-from-php/#findComment-805347
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.