mulligan
12-28-2005, 09:13 PM
Is there something I can add to a mail script writen in php that won't use the servername as the "from" when email is sent.
Everytime I try to send an email the from shows up as user@server.domain.tld
Theventor
12-28-2005, 09:18 PM
mail("youremailaddress@whatever.com", "$subject", "$email", "$comments");
There you go.
mulligan
12-28-2005, 09:24 PM
This is what I am talking about. I know you can simply change the mail to whatever you want, I am refering to the from section:
$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "user@domain.tld";
$Subject = "Subject goes here";
$FirstName = Trim(stripslashes($_POST['FirstName']));
$LastName = Trim(stripslashes($_POST['LastName']));
$XCSkiing = Trim(stripslashes($_POST['XCSkiing']));
$Paddling = Trim(stripslashes($_POST['Paddling']));
$Hiking = Trim(stripslashes($_POST['Hiking']));
$Biking = Trim(stripslashes($_POST['Biking']));
$SnowShoeing = Trim(stripslashes($_POST['SnowShoeing']));
$Other = Trim(stripslashes($_POST['Other']));
// validation
$validationOK=true;
if (Trim($EmailFrom)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.php\">";
exit;
}
01globalnet
12-28-2005, 10:57 PM
Not sure what you mean, but this should work
$EmailFrom = "Sender's Name <sendersemail@domain.com>\r\n";