Jump to content

[SOLVED] mail on localhost


Brian W

Recommended Posts

yeah, I know that this topic has already been discussed (a lot) but not finding what I need.

We have a system running II7 on Windows Server 2008 *64bit

Mail server is local and is SmarterMail 5 which boss set to listen on port 80 supposedly (don't ask why)

Problem: it doesn't work... gets errors about SMTP

when I use our domain name, it works (slowly)... but I would like to be able to use "localhost"

I've tried on port 25, 50, and 80

25 and 50 return immediately

Warning: mail(): Failed to connect to mailserver at "localhost" port X

port 80 just hangs until it times out while the status bar slowly creeps up to a little less than halfway. Once it times out it comes up with the same error as above...

 

also, .ini says

; For Win32 only.

does this mean that I don't use those settings with our 64bit system?

Link to comment
https://forums.phpfreaks.com/topic/136088-solved-mail-on-localhost/
Share on other sites

If you have a mail server on localhost configured to listen to port 80 and you have a web server on localhost using the default port 80 for the http:// protocol, that is never going to work.

 

So, where are your mail server and web server located relative to each other?

 

Ignore the ; For Win32 only. comment in the php documentation. The SMTP and smtp_port settings are used anytime you want the mail() function to use the smtp protocol to give emails to the sending mail server (instead of directly accessing the mail server through a binary/exe API.)

 

I'm going to check with my boss again when he comes back around. I don't see why he would have it listening on Port 80, it didn't make since to me when he said it but sometimes he does weird things with the servers (its his first time owning and running his own servers and he has decided to configure things himself).

The one thing I did find is that the router is configured to have Port 25 as SMTP. but like I said, I get the error:

Warning: mail(): Failed to connect to mailserver at "localhost" port 25

 

\

I kinda figured that what it meant was just "Use these for windows only, not linux", but wasn't sure.

Well, didn't figure out how to get it to work on using localhost, but changed it to the internal IP address and it works.

Figured also that the reason it was going slow using the domain (mail.domain.com) is because SmarterMail had to scan the mail and crap like that. SmarterMail is configured to not bother scanning mail that comes from an internal IP.

Not fixed, just evaded.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.