SharePoint Event Receiver to create Lotus Notes Reminder - c#

What I'm trying to do is set up a SharePoint event receiver so that when an item is added to a SharePoint calendar, a reminder is setup in Lotus Notes with the same title/date/time.
I was able to create a Windows Forms Application that creates the Lotus Notes reminder, but when I put that code into a SharePoint event receiver, it doesn't run. I even tried putting some other code in the receiver that I know works, but with the Notes code in there, nothing runs at all.
Is it just not possible to do this because the Lotus Notes code needs to be run on a machine with a Notes client on it?

Yes, if you are using interop classes, you need to have a Notes installation on the machine, otherwise the DLLs that expose the Notes COM API aren't there for you to call. And this could be problematic if your SharePoint server is 64 bit, because IBM does not support the COM API on Win64. It can be made to mostly work, but it's not a good idea to go down that road.
There might be, however, other possible ways to do what you want. Domino can be configured for access via HTTP and supports web services and more recent versions support REST APIs.

As the Out of the box Lotus Search connector requires to have lotus on the local computer, I suppose you are right. You should have lotus on the local box.
It's logic actually, as the Lotus code requires to have the lotus libraries available, unless there is some http API or similar.

Related

How to Read/Write Contacts and Events in Outlook when it is set to Work Offline - C#

As the Title suggest, i am trying to Read and Write (R&W) Contact and Event information to multiple Outlook Accounts/Profiles in a local computer, while Outlook is set to Work Offline.
So far i discovered two ways to R&W contacts and Events to Outlook:
1.- Microsoft.Graph:
This seems to work only online, since it reads and writes to the Microsoft server, not to the local pst/ost files.
2.- microsoft.office.interop.outlook library:
This does work offline/locally (by accessing the Outlook pst/ost files) but the approach i am using so far requires the creation of an Application object as
var app = new Microsoft.Office.Interop.Outlook.Application();
Nevertheless, creating an Application object implicitly logs in a profile/user to the application, and further, if Outlook is already running and logged in with a Profile X, the code above instantiates an Outlook object in which the Profile X is logged in, so in that scenario i can only R&W Contacts and Events for that specific user/Profile.
So, is there a way to be able to R&W Contact and Event information for different profiles independently of if Outlook is running with a Profile X?
Well, there is no magic - if you want offline access, something needs to implement the storage to keep the cached data and cache your changes so that they can be uploaded when the server comes back online.
If you don't want to implement that logic, cached Outlook profile is probably your only choice. You are right that Outlook, being a singleton, can only access one profile at a time. You can use Extended MAPI to access a profile other than the other used by Outlook, but it is C++ or Delphi only. If using Redemption is an option (I am its author), it wraps Extended MAPI API for use in any language (C# included) - you can use its RDOSession.Logon method to access any existing profile.

Is there any way to develop Outlook add-ins for server side using C#?

I have developed (using C#) an Outlook add-in, which implements some rules on client side.
It receives each incoming mail, and if it fits some rules it locates it in a specific folder. The main issue is that it works fine, only when outlook client is open on user pc. If it is closed it does not work, because it is triggered on client's pc.
I wonder if it can get developed or moved somehow on server side (Microsoft 365 Exchange Server), so it works 24/7.
How complicated is the logic in code you have written ? eg a lot of the logic your talking about can be done in Office365 using Flow without needing to write any code (you can even write custom connectors for more advanced logic). You won't be able to use the Outlook code you have written but you can do the same thing using either the Microsoft Graph API and Webhooks to listen to incoming email and then use the Graph operations to perform whatever logic you have (host the app on Azure etc or even can be a server-less function hosted on Azure or AWS) or using EWS Notifications https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/notification-subscriptions-mailbox-events-and-ews-in-exchange

Outlook Interop from c# service

I have a barebones c# service installed and want to use the outlook.interop functionallity from within my program. Just to detect and read new emails recieved. I have the program that does this but it is a form application. Is it possible to use outlook.interop from a C# service?
Better avoid using an interactive application within a service environment. Using Outlook from a service is not supported by Microsoft and will get you probably in all sorts of trouble (think message boxes popping up for instance).
If you want to talk to an Exchange server better use CDO/MAPI or the Exchange Web service API.
If you want to talk to a POP3 or IMAP server use a dedicated library.
You should look at the Redemption RDO Library (commercial third-party tool), which is effectively a managed wrapper for MAPI that allows out-of-process access to Outlook stores. To detect new mail, you could subscribe to the RDOStore.OnNewMail event.

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?
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.

Skype plugin in C#

I write system, that collects informations about local system. It's a system like admin-client. Client collects and sends log to admin. There's of course possibility to get this log by admin over LAN, but I'd like to add option send log over Internet.
I thought about skype. Client must have logged skype and when admin (of course there must be appropriate authorization, but it's separate topic) send request by skype - client must e.g. connect to SQL database or simple file with collected log and send it over skype.
How can I do this?
Is this the best way? Plugin in skype? What lib may I use?
I think it's an either/or situation.
If you want an administrator who is already using Skype to be able to send this information over the internet, then a plugin which exposes that functionality in Skype is the way to go.
If you want the administrator to be able to send the information over Skype's network, but not necessarily have to have the application running (perhaps this will be done through the application that gathers data), then using the API to control Skype externally is better.
You can find the documentation for Skype here:
http://developer.skype.com/accessories
Skype has a COM API called Skype4COM which you could use through COM interop in order to access Skype.
It should be noted that SkypeKit is now available for use in both embedded and desktop programs. There's a small one-time registration fee (currently $5 USD) for each program, but it will allow you to access Skype without actually using any UI functionality (it's completely up to you to provide the interface).
Until SkypeKit is released, you're limited to the Skype Public API. However according to the docs this API only allows to specify the recipient and open the file dialog, initiating a file transfer automatically seems to be impossible (see "OPEN FILETRANSFER" in the docs).
I suggest you use an open protocol like HTTP or FTP instead.

Categories

Resources