Re: Sending mail through localhost

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

 



From: "W Roothman" <willows@xxxxxxxxxxxx>

Do I need to install a mail server, such as ArGoSoft Mail Server,
on my computer (MS XP) in order to prevent this error when sending
mail through a form (ref: N: Mail functions, PHP manual):

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1
Unable to relay for me@xxxxxxxxxxxxx in c:\inetpub\wwwroot\......
sendfeeback.php on line 22

php.ini is set to:

[mail function]
; For Win32 only.
SMTP = localhost ; for Win32 only

;For Win32 only.
sendmail_from = me@xxxxxxxxxxxxx ; for Win32 only

Your setting says you already have an SMTP server (mail server) installed on "localhost", which is the same computer PHP is running on. The error message implies that the server is working, but it's not set up correctly to send mail.


First of all, change the "sendmail_from" setting to your email address. Then, you need to set up your SMTP server to allow relaying from itself only. How you do this depends on your SMTP server. Then things should work correctly.

Alternatively, you can set the "SMTP" setting in php.ini to your mail server provided by your ISP, i.e. "mail.charter.net", set the "sendmail_from" to a "charter.net" (for example) email address, then restart your web server and things should work.

I'm no SMTP expert, so I can't tell you if any of this is the "best" way to do it or not, though...

---John Holmes...


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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux