Re: mail from

From: Date: Thu, 25 Oct 2007 11:21:30 +0000
Subject: Re: mail from
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-263643@lists.php.net to get a copy of this message
Richard Heyes wrote:
in my php.ini, I have this set sendmail_from = admin.intranet@tsanalytics.com yet when I do this command :("dcastillo@tsanalytics.com","TEST MAIL","TESTING MAIL"); I get this message Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Inetpub\wwwroot\intranet\test.php on line 4
And if instead of using the php.ini directive you use the fourth argument to mail()? Eg: <?php
    mail("dcastillo@tsanalytics.com",
         "TEST MAIL",
         "TESTING MAIL",
         'admin.intranet@tsanalytics.com');
?>
Oops. That should be: <?php
    mail("dcastillo@tsanalytics.com",
         "TEST MAIL",
         "TESTING MAIL",
         'From: admin.intranet@tsanalytics.com');
?> -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support

« previous php.general (#263643) next »