Hi,
I m trying to send emails from localhost to loclhost using outlook express - admin@localhost.com.
installed a smtp server named 'hMailServer'. Connection is ok between localhost & server.
But, something wrong in php.ini file or mail function. I m getting this error:
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in c:\wamp\www\joomla_1.0.12\components\com_order\order.php on line 840
In php.ini file, I updated like this:
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
And in mail function in order.php
//to send html mail, the content-type header is like this:
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
//From header : now this mail is fixed. Please collect it from database...
$headers .= 'From<admin@localhost.com>' . "\r\n";
//Also add the CC information
$headers .= 'Cc: ' . $mailCC . "\n\r";
//echo $custMailID;
//Now mail
mail($custMailID, $mailSubject, $mailBody, $headers);
So, where is the mistake?