Search code examples
c#.netcom-interoplotus-notes

Send mail using c# and Lotus Notes using Client


I'm having trouble finding a simple sdk to integrate the Notes-Client from within my c# winform app.

Requirements: In a c# WinForm application I have to sent notifications by email. These emails should be stored in the "Sent"-folder of the end-user's mail-client. People who receive the emails should see that the mail does not come from an application, but someone else s mailbox.

Approach: Since I need to store the emails within the Sent-folder of the end-user, I thought I should make use of some Notes-api and let the client-application take care of storing and delivering the emails. Alternatively use late binding.

Problem: I don't have Lotus Notes installed and rather not install it (I can test on a different non-developer machine). Apparently the only way you can get the proper interop-dlls is by downloading and installing the Lotus Notes application.

Questions: - From what I read I understood there are two interop-dll's: 1 for the server (Domino) and 1 for the client (Notes). The latter only supports the 32-bit version of the client. Is that correct? - Does anyone have a download-link to the sdk or the dll's that I need?


Solution

  • Actually there are three options: the COM interop from the cleint code, the COM interop from the server code, or the OLE classes from the client code. The latter requires that the Notes client not only be installed, but actually running when your code sends the message, as the OLE calls actually drive the client front-end UI to do the work. You probably don't want that.

    However, I think you're still going to be better off dropping your "rather not install it" preference. In addition to the COM Interop layer, you have to have the Notes core DLLs installed on the machine where the code runs, no matter what API you use for Notes/Domino development. That means you must either have a Domino server or a Notes client installed on the box where the code will run. (The only exception is for Java programmers, who can use an API that makes IIOP calls to a remove API that executes on the Domino server.)

    Yeah, I know you said you'd do late binding... And theoretically you could avoid installing Notes clode on your development machine as long as it's there on your test machine. But in that case, your test machine is really going to be your development machine for this part of the project. You'll end up debugging and modifying your code there, and you'll do it with no help from the compiler. I don't see the point of losing the compile-time benefits of early binding just to keep Lotus Notes off your machine. It doesn't bite, really ;-)

    As for your specific questions, the only client code available is 32-bit, and the core DLLS and COM interfaces come with it. The trial client download is available here. What you really should do, however, is get the free Domino Designer download here, which includes the client code and also includes all of the developer help files and examples. As an alternative, you could install 64-bit Domino server code instead of client code, and the 64-bit COM interfaces do exist -- however they are not supported by IBM and there are some things that don't work.