views:

23

answers:

3

Hi !

I'd like to open a new email page, in Lotus Notes (I know I know, I hate it too...) from a WinForm (.NET) application. Right now, I have found this that uses Interop.Domino.dll very useful. I adapted it a little and it works. Unfortunately, I don't want the email to be sent. I just need to open a new mail window with the body I give it, but no "To adress"...

I know Notes question don't have a high reply rate over here, but I give it a try anyway.

Thanks !

A: 

The Lotus Domino Objects (Interop.Domino.dll) don't have access to the Notes UI. You would need to use the deprecated, late-bound Lotus Notes Automation classes. Warning: they're crashy, which is one of the reasons they've been deprecated for more than ten years (since the release of Lotus Notes and Domino R5.0.2c).

Stan Rogers
Since they're crashy, I'll try something else. Thanks for the tip and the warning.
ultraman69
+2  A: 

On Windows Notes clients greater than version 6, there is support for a Notes:\ URL scheme to launch documents. You can construct a URL dynamically in .Net that points to the user's mail database and opens a new mail form.

http://www.dominoguru.com/pages/LotusNotes_notesURLs.html has more details, but essentially it is of the form Notes:\server\database\0\memo?OpenForm

Ken Pespisa
I didn't fully tested it yet, but it definitely seems to be the way I want to do it.
ultraman69
+1  A: 

Any reason you can't just use a mailto call in your code? Assuming that Lotus Notes is the registered mail handler on the client system, you should be able to pass in the body attribute and wot-not…

Ben Poole
That's what they actually use, but it got a limitation of about 150 char from what they told me.
ultraman69
I think the limit depends more on the browser: for example, many limit parameters to around 255 characters, so a mailto with a long body string can fail. I'm not aware of any specific limitations in the Lotus Notes mail client with regards mailto, but they could well exist of course.
Ben Poole