Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SMTP through ms exchange server

Status
Not open for further replies.

OttSens

Programmer
Dec 13, 2001
80
US
Hi All

Has anyone sent email through ms exchange server?
This is just smtp which for a regular email server is
simple (no pun). If I try to connect to my the
server that my outlook account uses on the standard
port 25 I can't connect, the connection is refused.
The same code works fine from my home account which
is with a regular email account.

I'm thinking that ms exchange must use some proprietary
protocol (?) or a non standard port number (?) for smtp.

 
I would suspect you have firewall blocking your requests, or the mail server itself denying your IP. Can you telnet into port 25 of the server? For example:

telnet my.mail.server.ip 25

You should see something like this:

220 my.mail.server.ip Microsoft ESMTP MAIL Service, Version: 5.0.2195.3779 ready at Fri, 4 Jan 2002 09:52:26 -0500

If the connection is refused, then most likely the problem is not code related. Nate Gagne
nathan.gagne@verizon.net
AKA Nick Burns - Your Company's Computer Guy
"Would you like me to save your game of Minesweeper first?"

Like my post? Let me know it was helpful!
 
I don't think it is a firewall issue. I go through
a proxy for http. However for ftp I don't need
to go through the proxy. It doesn't look like there's
any proxy in the outlook config. There's just a server
name.

The smtp error is "Forcefully rejected" which is of
course completely amusing.

Actually I just telnet'ed to the machine successfully
and saw "Welcome to Microsoft Telnet Server" and a c:
prompt!

Go figure.


 
Make sure you telnet into port 25 of the machine like this:

telnet my.mail.server.ip 25

See if you get a response that way. Nate Gagne
nathan.gagne@verizon.net
AKA Nick Burns - Your Company's Computer Guy
"Would you like me to save your game of Minesweeper first?"

Like my post? Let me know it was helpful!
 
Be aware that as of version 5.5, Exchange can be configured to reject attempts to connect to port 25, except for from specific IP addresses.
 
Telneting to 25 on that machine gets a connection
refused. I thought that it would anyway even if
there is an smtp server listening there. Isn't telnet
a very different protocol and needs a telnet server
to connect?
 
I guess the bottom line is that this is an issue to
this network. What I was really after was that it
is possible to hit an ms exchange server on port 25
and using correct smtp commands perform the transaction.
I'm hearing that it is.
I'm aware that sometimes ms software uses proprietary
protocols but I was confident that as a "mail server"
exchange would at least offer regular old smtp and pop
and imap on standard port. It does, I guess.
 
You can use telnet to connect to pretty much anything that listens on a TCP/UDP port. Telnet IS a service (listens on port 23), but you are actually using a telnet CLIENT to connect to the service. You can telnet into port 80 on machines and see all the information that gets passed to your web browser. You can telnet into port 110 for POP3 and issue mail retrieval commands.

MS Exchange is simply a way of serving mail internal to a network. Outside, there is still a SMTP/POP3 setup to catch incoming (non-local) mail.

You will definately have issues connecting to a secure mail server. If this is a project for your company, talk with your IT manager and see if there is anything that can be done to allow your program to connect to the server. Nate Gagne
nathan.gagne@verizon.net
AKA Nick Burns - Your Company's Computer Guy
"Would you like me to save your game of Minesweeper first?"

Like my post? Let me know it was helpful!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top