On Thursday 25 January 2007 18:51, M.Sokolewicz wrote:
> Chantal Rosmuller wrote:
> > Hi everyone,
> >
> > In November I sent a mail to this list asking how to get the mail From
> > header right, I solved that but I still have a problem. The solution was
> > using the -f option like this:
> >
> > $frommail = "[EMAIL PROTECTED]";
> > mail("$to", "$subject", "$message", "$headers","-f$frommail");
> >
> > The from address is correct now but the displayed name is still www-data
> > (or apache, depends on the server configuration). The header looks like
> > this:
> >
> > From: [EMAIL PROTECTED] (www-data)
> >
> > Is there anyway to change this?
> > Thanks, regards Chantal
>
> $frommail = "[EMAIL PROTECTED]";
> mail("$to", "$subject", "$message", "$headers","-f$frommail");
>
> is an extremely ugly way to pass variables IMO.
> $frommail = "[EMAIL PROTECTED]";
> mail($to, $subject, $message, $headers, "-f".$frommail);
>
> is a lot nicer IMO. Anyway, to get back to you. The "name" you want
> would be supplied by having the header
> From: [EMAIL PROTECTED]
> in the following format:
> From: MyName Goes Here <[EMAIL PROTECTED]>

Okay that works! Thanks a lot.

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

Reply via email to