RE: php.ini & ini_set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, October 31, 2006 8:59 pm, Beauford wrote:
> That doesn't work.
>
> Here is what I have.
>
> mail($email,$subject,$body,$from);
>
> Which is (senders address, the subject, the body of the message, and
> the
> from address)
>
> The from address is taken from this, and I added the -f in front of
> it.
> define("regaddress", "-fregistrar@xxxxxxxxxxxxxxxxxxxx");
>
> It still says it comes from:
> Nobody [nobody@xxxxxxxxxxxxxxxx]; on behalf of; Registrar
> [-fregistrar@xxxxxxxxxxxx]

You're confusing the 4th and 5th parameters, partially because Chris
has misled you :-)



4th:  Regular headers like "From: registrar@xxxxxxxxxxxxxxxxxxxx" and
"Reply-to: registrar@xxxxxxxxxxxxxxxxxxxx"

5th: Args to sendmail, if your PHP user is a trusted user for sendmail
(unlikely in a shared-host environment with no php.ini) so you can
hack the "-f" which really truly forges the "sender" rather than
kinda/sorta forging it.

They are quite different, and serve different purposes.

You probably only *need* the 4th at this point, but need to construct
valid email headers (see 4th above) and not valid sendmail command
line flags (what you are trying to do now).

Note that spam filters will "catch" the forgery in 4th and penalize
you for it, so do everything else you can to make your email not look
like spam.  Unless it is spam, in which case you want to be sure to
use HTML enhanced (cough, cough) email, and lots of USELESS CAPS and
plenty of explamation points!!! and be sure to attach a couple GIF
images, and embed a reader-tracking GIF and...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux