Re: [PHP] "sendmail_from" not set in php.ini or custom "From:" header missing

2004-07-16 Thread Curt Zirzow
* Thus wrote Wudi:
> Script:
>  mail('[EMAIL PROTECTED]', 'Subject', 'Message', "From: [EMAIL PROTECTED]");
> ?>
> 
> Result:
> Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom 
> "From:" header missing in D:\ApacheData\htdocs\downloader\mail.php on line 2
> 
> Why does the mail() not work?
> How can I send a e-mail without SMTP?

sendmail_from is required to be filled out. You need to specify in
your ini a valid sendmail_from, or use ini_set('sendmail_from',
'[EMAIL PROTECTED]') before your call your mail() function


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] "sendmail_from" not set in php.ini or custom "From:" header missing

2004-07-16 Thread Justin Patrin
On Sat, 17 Jul 2004 12:16:25 +0800, Wudi <[EMAIL PROTECTED]> wrote:
> Script:
>  mail('[EMAIL PROTECTED]', 'Subject', 'Message', "From: [EMAIL PROTECTED]");
> ?>
> 
> Result:
> Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom 
> "From:" header missing in D:\ApacheData\htdocs\downloader\mail.php on line 2
> 
> Why does the mail() not work?
> How can I send a e-mail without SMTP?

No idea why it doesn't like your From header. Try setting
sendmail_from in the php.ini. You could also try a mailing library,
such as:

http://pear.php.net/package/Mail

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php