Reply to Re: Sending mail with php-

Your name:

Reply:


Posted by James Benson on 01/11/06 21:42

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@example.com', 'the subject', 'the message', null,
'-fwebmaster@example.com');
?>



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@localhost.localdomain>
> <<< 550-unrouteable mail domain "localhost.localdomain"
> <<< 550 Sender verify failed
>
> So I changed the only email address in httpd.conf to:
> ServerAdmin dotan@lyricslist.com
>
> 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
> (-)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация