1

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.

Haim Bender
  • 7,937
  • 10
  • 53
  • 55
  • This is similar to this question: [http://stackoverflow.com/questions/652549/read-ms-exchange-email-in-c](http://stackoverflow.com/questions/652549/read-ms-exchange-email-in-c) – Geoff Appleford Aug 24 '09 at 12:38

4 Answers4

3

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
  • 24,152
  • 13
  • 73
  • 111
  • 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 Aug 24 '09 at 12:42
  • Your exchange server can act as an SMTP server. Just try: telnet YourExchange 25 where YourExchange is the name of your server. You should be able to connect. – DmitryK Aug 24 '09 at 21:55
1

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
  • 37,700
  • 14
  • 97
  • 166
0

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

Rik Heywood
  • 13,816
  • 9
  • 61
  • 81
0

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
  • 5,542
  • 1
  • 22
  • 32