changing the value in the php.ini file is not the ideal option, as it
screws things up for all of users/scripts on the server.

you could use ini_set() for the script to change the sendmail_path var
for that script.

you could use a mail class that does alot of the grunt work for you
(Manuel Lemos normally posts some classes from his site, however I use
PHPMailer (http://phpmailer.sourceforge.net) and have never looked back.

On Fri, 2003-05-30 at 03:26, David Grant wrote:
> Bersani Francesco wrote:
> 
> > Hi, I have a problem with the "mail" function; it always sends mails
> > assuming in the "from" field the user "[EMAIL PROTECTED]".
> > I tried to override it with this code:
> > 
> > ----------------
> > <?
> > $email = "[EMAIL PROTECTED]";
> > $subject = "prova invio mail ";
> > $message = "parappaaaaaaaaaaa ";
> > $headers = "From:[EMAIL PROTECTED]:[EMAIL PROTECTED]";
> > 
> > mail($email, $subject, $message, $headers);
> > 
> > ?>
> > ------------------
> > 
> > It doesn't work...
> > 
> > Can anybody help me ?
> 
> 
> Take a peek into php.ini to change the default value.
> 
> Note that you should seperate mail headers with \r\n.
> 
> Regards,
> 
> David
> 
> 
> -- 
> David Grant
> Web Developer
> 
> [EMAIL PROTECTED]
> http://www.wiredmedia.co.uk
> 
> Tel: 0117 930 4365, Fax: 0870 169 7625
> 
> Wired Media Ltd
> Registered Office: 43 Royal Park, Bristol, BS8 3AN
> Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD
> 
> Company registration number: 4016744
> 
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> 
> **********************************************************************
-- 
Michael Geier <[EMAIL PROTECTED]>


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

Reply via email to