ASP.NET Check new mail on Lotus Notes/Domino server - lotus-notes

Is there a way to check new mail on a Lotus Notes/Domino server in ASP.NET 3.5+, for multiple users. Users are logged in with there Windows Domain account into the ASPx application.

Given, that the Domino servers are also on Windows and they have SPNEGO activated for SSO, you have several options, depending on what you mean by "check new mail".
If you want to include the Inbox in your ASP.Net app eg. as an iframe, you can use iNotes portal mode to accomplish that.
If you are on Domino 8.5.3, you can use the REST services of the new extension library to access the Inbox contents via a few REST calls and Json. See the link for more infos.
If you want to access the "new mail" in the backend of your ASP.Net app, you are problably out of luck, as the information about "new/unread" mail is stored per user and you would need the ID-File/password or http password of the user to access that information.
But maybe you could provide more info, so we can give better advice.

Well, yes you can, but it's not a straight up webservice call. I'm not aware of any turn key configuration that would enable this. So, you will need to "roll your own" service. If so, then you'll be interested in "Unread marks" or "Unread email". This is a unique function to Lotus Notes and is not exposed as service in Java or .Net. But you can get around it by using the "GetAllUnreadEntries" method in the Lotus Notes object API.
Using this method, you can programmatically emulate it without too much complexity. Is it possible for you to try this:
Can you implement in an ASP.Net application a "last Checked" date/time value that is set when you traverse the inbox of Domino mail account ?
Now whilst looping through the inbox, get the created date of each document.
In the case of email in a Lotus Notes database, this is the date the email hit the account. So it should be a fairly reliable means of determining the arrival date of the email.
The created date property is under the NotesDocument object as "created". This should return a date/time value that you can use. Any document that is newer than the "last checked" value would therefore be new mail.
If you have a particularly large inbox to loop through, you can get the inbox object (which can be treated like a view), and also use "GetAllUnreadEntries" method on the NotesView object.
Links to example code are in the links above.

Related

Email sent from lotus notes which includes sent form not working in gmail

While sending email from lotus notes to Gmail using Lotus Script, buttons are not visible in Gmail.
As Anders says, Any standard or custom Action Buttons (at the top) will not be available in Gmail. You would need to code your own Gmail interface to reproduce.
If you are talking about buttons in the actual rich text of the mail, these will definitely not get translated when the mail leaves and you should get a message saying...
"The following items cannot be sent or saved in MIME (internet mail) format."
That would be a clear sign that you are going to need to take another look at your assumptions.
If you are planning a migration, you do need to check your assumptions (and your vendor's promises) carefully, there is a lot of infrastructure and functionality that is taken for granted in the Notes/Domino stack and just not available, or significantly different, in others.
Stored forms are a feature that is unqiue to Notes. They contain Notes design elements, formulas and scripts that execute Notes functions that are provided by the Notes API DLLs that are only available in the Notes client. GMail doesn't know anything about them. Outlook doesn't know anything about them.
But if you want to send them to someone who has a GMail address but who also has the Notes client, then there is a way to do it manually using the "Send this email to other Notes mail user(s) through the Internet" feature, which appears in the Advance tab of the Delivery Options dialog that you can bring up when sending a message. There is no simple API for automating the mechanism that is used, but it can be done. It requires creating a new empty database file with a special name (encap.ond), saving your document into that database, and then attaching the the file to a new message, which will be the one that you actually send. I don't recall if any special headers are required for this, so if you want to pursue it you will have to do some investigation by using the manual process and checking out the full headers of the message on the receiving side.

Add custom text to Sharepoint Email Alert

We have an alert set-up for sharepoint list, but I want to add some custom text to the alert email. We do not have any access to SPD or sharepoint server and can make changes to sharepoint client only.
Can anyone please advice?
The code that sends out emails runs on the SharePoint server via the Timer Job. Since you have no access to do anything with the server you've got absolutely no chance of modifying the built in alert emails.
Could you do this with javascript?
You can't send emails with JavaScript directly. You can open up a draft email in a users default email client using a mailto link but this won't achieve what you want as a user will still have to edit it.
You could, I suppose, put some javascript onto an edit page using a content editor web part (which you can do without SPD) to on changes make an AJAX call to a separate web server to do the actual sending.

How to create action hotspot in UI document

I've got some nice little LotusScript that I can put into the Click event of an Action Hotspot in a rich text field when I'm sending an email manually. Is there a way to programmatically create that in the UI?
My script determines the user's home server and then opens a specific document in the replica of a training database on their home server. I could create these messages with hotspots manually and provide them to the folks who want to email them out. Of course, time being money and the task being boring, I'd rather automate it. I know that I could do this by using a stored form, but am wondering if the greater capability exists, as I can see further applications for it.
One trick I used in the past was to create a profile document in a database, and store some rich text in a field on that profile doc. Then when I needed to programmatically send an email, I could get that rich text field from the profile doc and use AppendRTItem to get it into the body of an email. That should work with any type of rich text, including hotspots.
Note: this won't work in the UI to populate a new email. It does work if you are generating the emails completely in code, though.

Set field via URL

Is it possible to have a field in the current item be changed by clicking a URL? The field would be a choice field with predefined choices.
Such as if the item field is currently:
Status: 2
If a user clicks the link, the field would now be:
Status: 3
If not, is there any other way for a user to easily change a field in the current item without actually haveing to visit the item?
Thanks!
Not Out Of The Box (OOTB) - but you've a few options.
Write an ASPX page to do what you want
Use something like SPServices and javascript to update the list item via the web services.
Use the Client Object Model (2010 only)
By the way - changing stuff on a 'get' can be dangerous as you can do malicious things - for example imagine you have a page that deletes the users account without any prompting (exact example doesn't matter) - what if someone clicks on that link by mistake or even worse what about an email sent with an image with that page as source URL - simply viewing the email could delete the users account.
It's not possible by using a GET request, but SharePoint 2010 is offering a RESTful API to manage ListItems from any client
The REST API is located within the virtual WebServices folgder under each SharePoint Site.
http://YourSharePointSite/_vti_bin/ListData.svc.
To perform an update on SharePoint ListItems you have to create a PUT Request. For more information on SharePoints REST API you should have a look at this MSDN site, there are also a lot of samples linked from this article.
Thorsten

Is it possible to autocomplete fields in Sharepoint with user info?

I'm in charge of a Sharepoint collection, and a user asks this. Is it possible that when a user creates an item, some fields are automatically filled with some info, such as email address and location?
Authentication uses Active Directory, so every user is identified when using Sharepoint. The only issue is that, being in a big corporate company, I don't have any access to the server, so it must be feasible through configuration of said site/list or using Sharepoint Designer, but I can't and won't be allowed to deploy anything server side.
Any idea?
With your limitations, your best bet would be a combination of ajax (I suggest jquery) and sharepoint webservices (if necessary), you need to do a XmlHttpRequest in the userdisp.aspx page, if this page has all the info you need, then get it, otherwise, get the currently logged account and use it to query the webservices (this part I'm not sure if theres a method that will return this info).
This all works using only the browser (Content Editor WebPart) or the SharePoint Designer client.

Resources