tags:

views:

135

answers:

5

I would like to send emails from a cmd batch file on windowsOne of my chalanges is that I don't have an smpt server, I'm using an microsoftexchange server in an internal network (no internet connection).

Plz help, Thanks.

PS: I do not want to use BLAT becuase it requires an SMPT server which I do not possess on my internal network.

+3  A: 

MS Exchange Server is an standard e-mail server and uses SMTP protocol anyway connected to the Internet or only on a local network.

Try BLAT

Update If you don't have file access to your server and you don´t want to use SMTP you need another protocol to communicate with the server (ftp, http, ssh), don't you ?

PeterMmm
I do not want to use BLAT becuase it requires an SMPT server which I do not possess on my internal network.Thanks anyways.
Haim Bender
Your exchange server can act as an SMTP server. Just try:telnet YourExchange 25where YourExchange is the name of your server. You should be able to connect.
DmitryK
+1  A: 

You could get the exchange server configured for SMTP relay from the internal interface, but that doesn't solve the whole story. To send from the command line you'd need a third party application like Blat or similar.

Rowland Shaw
you got something else other then blat?
Haim Bender
We have our own one for internal use, but everything out there si going to need either an SMTP server, or at the very least, to be able to connect to SMTP servers in the outside world.
Rowland Shaw
A: 

I built an app to do this once, but I can't find the source right now (it's on an old machine).

However, it was based on the sample code found here on Code Project...

http://www.codeproject.com/KB/IP/cmapi.aspx

rikh
+1  A: 

This is similar to this question:

http://stackoverflow.com/questions/652549/read-ms-exchange-email-in-c

geoff
A: 

If you have access to your Exchange server you can just dump an *.eml file into the pickup directory. I mean your CMD file can create an EML file and then copy it to the pickup directory on the Exchange server.

DmitryK
sorry, don't have access to the exchange server.../
Haim Bender
When I said "have access" I meant to be able to dump a file into a pickup folder. You can ask your admins to share this folder for you.
DmitryK