Re: php mail() and sendmail/smtp

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

 



2010/12/2 Michael Crowl <octopus@xxxxxxxx>:
>
> Possible solutions?  I'm a little frazzled and a little undereducated here.

    Use the under-appreciated fifth paramter in mail() to pass the -f
flag to sendmail, like so:

<?php
$to = 'danbrown@xxxxxxx';
$subject = 'This is an emample for a php-general request!';
$body = 'This is the body of the email.';
$headers  = "From: daniel.brown@xxxxxxxxxxxx\r\n";
$headers .= "X-Mailer: PHP/".phpversion()."\r\n";
$sendmail_flag = '-fdaniel.brown@xxxxxxxxxxxx'; // Note the lack of
space between the flag and variable

mail($to,$subject,$body,$headers,$sendmail_flag);
?>

-- 
</Daniel P. Brown>
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

-- 
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