Hi, the code below sends an email as expected when I run the program in the ZEND studio environment by clicking the run button. But when use a browser to run the program, it encounters the following error.
Does anybody can tell me what seems to be the problem/solution.
Thanks in advance.
-Jun
-------- THE ERROR MESSAGE ----------
Debug Warning: c:\Inetpub\wwwroot\blo\sendmail.php line 6 - mail() [<a href='function.mail'>function.mail</a>]: "sendmail_from" not set in php.ini or custom "From:" header missing
-------- THE CODE -------
<?php
class b_event_recoverpwd
{
public function b_event_recoverpwd(){
mail("junbagares@yahoo.com", "the subject", "My Message");
}
}
$obj = new b_event_recoverpwd();
?>