Forum Moderators: coopster

Message Too Old, No Replies

Setting up a localhost mailserver

         

ukgimp

1:42 pm on Jan 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello

I have tried quite a few things to get my localhost (IIS) on which I am running phpdev to send mail through its server. I have set it so that only my IP can use the server for a relay in IIS.

I have also altered the php.ini (and restarted it :))

PHPINFO shows the changes but when I go to send mail I get:

Failed to connect to mailserver, verify your "SMTP" setting

Now I have tried a lot of variations more the setting.
eg
smtp.localhost.25
smtp.myip

But all to no avail.

Any suggestions?

Regards

Brett_Tabke

2:10 pm on Jan 30, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Have you tried coming at it without php in the loop? Can you get other programs to connect to the server?

I'm running a local smtp server/pop3 grabber on my local box, and I can get to it ok from perl/php (win98).

ukgimp

2:24 pm on Jan 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello Brett

I tried

telnet localhost 25

and it shoots to

220 mycomputername.######.ac.uk M$ ESMTP Mail Service
329 Ready

But I still get an error when I go to execute a script like

I think my problem is related to the line

SMTP = mail.mydomain.com

but am baffled. Sure it is something simple but I am not up in this stuff too much.

andreasfriedrich

3:01 pm on Jan 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried
SMTP=localhost
? This is the domain name you were able to use to telnet to it. smtp.localhost will only work when it resolves to localhost as well. You could try telnetting to smtp.localhost to see whether that is the case.

Andreas

ukgimp

3:54 pm on Jan 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



andreas

I have tried localhost as well as 127.0.0.1. I have set the relay and connection to only allow them access. The script now executes apparently without errors but the mail never appears.

Thanks for your patience

ukgimp

3:13 pm on Jan 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks everyone. Still no joy on the localhost so plan B:

Use and institutional mailserver that I have access to :)

cyclic

7:02 pm on Jan 31, 2003 (gmt 0)

10+ Year Member



I had this problem with phpdev and it was because I had two php.ini files! Once I had sorted that out I could send mail ok from localhost.