Archived Forum Post

Index of archived forum posts

Question:

Using exchange server

Aug 21 '14 at 17:14

How can my application - by means of the chilkat software - use an exchange server to send mails. I tried using the CkMailMan_SendEmail function but probably I need to do some extra setup to make this work ?


Answer

Exchange Server implements the server-side of the POP3, IMAP, and SMTP protocols. Therefore, any software that implements the client-side of these protocols will work with Exchange Server in exactly the same way as any other email server. (See the note below regarding NTLM authentication.)

The purpose of a protocol is to allow any client-side implementation to communicate with any server-side implementation. As long as each side correctly implements the protocol to specification, everything works. For example, a web browser implements the client-side of the HTTP protocol. You may not realize it, but it communicates with many different web server implementations: IIS, Apache, etc. You can browse the web because the both clients (i.e. web browsers) and servers correctly implement the HTTP protocol.

Therefore, all of the examples involving POP3, SMTP, and IMAP at http://www.example-code.com/ are examples that will work with Exchange Server.

*** MS Exchange implements an additional authentication mechanism named "NTLM", which is also known as Windows Integrated Authentication. Chilkat supports NTLM for POP3, IMAP, and SMTP.


Answer

I believe the SMTP "part" (called a Connector) must specifically be enabled by the Exchange admin and you need TLS/SSL to connect.

Also found this in an email with a colleague:

the big difference between Exchange 2003 and Exchange 2007/2010 is that Exchange 2010 does not allow to relay mails from an unauthenticated sender. E.g. http://blogs.catapultsystems.com/tharrington/archive/2010/07/20/anonymous-relay-with-exchange-20072010.aspx shows the steps, for security you can configure (recommend!!) only one single IP address that is allowed to use this connector. With these settings you should be able to send mails through Exchange 2010 as you already do with Exchange 2003.


Answer

I make extensive use of exchange servers for passing outbound mail to remote addresses. I handle it either of two ways ... both work.

  1. enable relay as is touched on in the 1st answer. There are drawbacks, easily done, but can be inconvenient if the host originating the email uses dynamic IP addressing.

  2. not discussed above, is to use TLS. Using TLS will require that you authenticate via the mailman.SMTPUsername and mailman.SMTPPassword parameters, so you'll need an account in the authentication domain for the exchange server.

I wish I'd known about the NTLM support .... I'll be checking it out.

BTW - I've found that many ISP's are blocking clients from using port 25, only allowing outbound mail via port 587. Between TLS and use of port 587 you should easily be able to connect with Exchange through any(?) ISP.