Hi,
I am sending a simple email through mail() function in php.........But it flagging up with the error given below:
PHP Warning: mail() [ function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\HostingSpaces\myweb\mywebsite.com\wwwroot\contr oller\contact.controller.php on line 73
Pleasae find the more details as how I am doing this:
PHP Code:
$msg = $_POST['info']; $em = $_POST['email']; $nm = $_POST['name']; $ph = $_POST['phone']; $cont = $_POST['country']; $st_addy = $_POST['streetaddress']; $city = $_POST['city']; $zip = $_POST['pin']; $com = $_POST['company']; $abt = $_POST['product']; $from = "Customer Care <admin@mywebsite.com>"; $to = "Admin <myname@gmail.com>"; $subject = "Hi!"; $message = "Dear Admin, A customer ".$nm.", has asked a quote, detials are: Email: ".$em." Phone: ".$ph." Country: ".$cont." City: ".$city." Zip: ".$zip." Address: ".$st_addy." Product Id: ".$abt." Message ".$msg; $headers = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail($to, $subject, $message, $headers, $from); die;
|