Re: Sending mail with php-

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

 



You need a domain name pointing to your IP address for a start, then you either need to configure php.ini to use the correct email or you should pass the additional param to sendmail, as shown below.


Taken from  php.net:

The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option.

The user that the webserver runs as should be added as a trusted user to the sendmail configuration to prevent a 'X-Warning' header from being added to the message when the envelope sender (-f) is set using this method. For sendmail users, this file is /etc/mail/trusted-users.



The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path.
<?php
mail('nobody@xxxxxxxxxxx', 'the subject', 'the message', null,
   '-fwebmaster@xxxxxxxxxxx');
?>



James


Dotan Cohen wrote:
On my home Fedora Core 4 box I run Apache 2.0. Sometimes when sending
mail with php no mail is delivered, and I find this in the logs:

<<< 550-Verification failed for <apache@xxxxxxxxxxxxxxxxxxxxx>
<<< 550-unrouteable mail domain "localhost.localdomain"
<<< 550 Sender verify failed

So I changed the only email address in httpd.conf to:
ServerAdmin dotan@xxxxxxxxxxxxxx

But I still get the error! I did restart apache and even went so far as to
reboot the machine. If I cannot modify the parameter within apache,
then where should I modify it? Within php? Within sendmail?

Thank you.

Dotan Cohen
http://technology-sleuth.com/question/what_are_the_advantages_of_lcd_monitors.html
(-)

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