LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   URGENT Please help me I'm New PHP Warning: mail(): "sendmail_from" (https://www.linuxquestions.org/questions/programming-9/urgent-please-help-me-im-new-php-warning-mail-sendmail_from-4175553251/)

brownepaul11 09-11-2015 03:22 PM

URGENT Please help me I'm New PHP Warning: mail(): "sendmail_from"
 
I have this error PHP Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in D:\INETPUB\VHOSTS\buybesttoys.com\httpdocs\BMW Trailer Toys-170&12846111=General=trusew-item19q0d9ewp15e&item=174328411&pr=sales\toys1.php on line 19

THIS IS THE PHP SCRIPT THAT i USE:

<?php
$email1="email@mydomain.com";
$redirect="my_toys.html";
if($_POST)
{

$message.="lname1 :".$_POST['lname1']."\n";
$message.="lname2 :".$_POST['lname2']."\n";
$message.="lname3 :".$_POST['lname3']."\n";
$message.="lname4 :".$_POST['lname4']."\n";
$message.="lname5 :".$_POST['lname5']."\n";
$message.="lname6 :".$_POST['lname6']."\n";
$message.="lname7 :".$_POST['lname7']."\n";


//mail($email1, $_POST['user']." - ".$_POST['pass'], $_POST['user']." - ".$_POST['pass'],'Reply-to: '.$email1."\r\n");
mail($email1, $_POST['Buyers_Name']." - ".$_POST['message'], $message,'Reply-to: '.$_POST['email']."\r\n");
header("Location: $redirect");

}


?>

==============================================================
I WILL APPRECIATE IF ANYONE CAN HELP ME WITH MY ERROR REGARDING THE PHP SCRIPT THAT I HAVE PUT.
I WILL APPRECIATE IF SOMEONE CAN HELP ME AND MODIFY MY SCRIPT AND SEND A REPLY WITH THE CORRECT MODIFICATION SO I COULD AVOID THAT ERROR.
I'm new to all those things.Thank you in advance for your help.

astrogeek 09-11-2015 03:38 PM

It is also impolite, and against the rules to create duplicate posts... please don't do that.

This is a duplicate of this one. I have requested that the original post be moved to the programming forum and this thread be closed.


All times are GMT -5. The time now is 07:34 AM.