Groovy Email client to work on both Exchange 2003 and Exchange 2010 - email

I need to implement a feature in my application to process an email, that I need to read by logging into the Exchange server. My question is what is the way to make my solution to work in both Exchange 2003 and 2010?
In near future my exchange sever may get upgraded
Note: I cannot use Imap, POP, etc...
I can use only Mapi or EWS.

There appear to be several options in Java to do this but no groovy specific ones. Pick one of them and use it from your groovy code. I haven't tried any of these but have a look at all the exchange providers listed on this page

Related

Open source JMAP compliant servers?

I'm exploring the possibility of building a centrally hosted email client, embedded within my site. Users would be provisioned a new email address from me, they are not using their existing email. Essentially, I'm looking for the feature set of an email web client (multiple user accounts, get inbox messages, read, delete, compose new, organize, etc) exposed as set of RESTful APIs. A brief web search uncovered very little meeting my desires, but I did come across http://jmap.io. I was unable to find an existing implementation of the specification that I could leverage for my solution, and would love to avoid writing my own. Are there any existing solutions (JMAP or otherwise) that might meet my needs? I've ruled out https://context.io/ because I cannot have the emails stored or consumed by a third party.
I'm actively contributing to the Apache James Server. As part of my work, I am working on a JMAP implementation with my co-workers.
So far, we are able to build a working web-mail on top of it in one of our company product, OpenPaas.
And as it is an Apache project, it is OpenSource. Maybe you want to have a look...
https://github.com/apache/james-project/tree/master/server/protocols/jmap
http://james.apache.org/
I just want to add that as for now (2020) Cyrus IMAP also has JMAP support.
Stalwart JMAP server was just released (September 2022) and it includes full support for JMAP Core, JMAP Mail and JMAP over WebSocket. Support for JMAP Contacts and Calendar will be added as soon as these become IETF standards.

Logging into Outlook using powershell with no user logged on

I was wondering if its possible to create a powershell script to log into a specific outlook mail box and than add the script to the scheduled task so that no user has to be logged on.
If you need to open an arbitrary Exchange mailbox, you can either
Use Outlook Object Model (which cannot be used in a service, such as the Scheduler) to log to a predefined profile (Namespace.Logon) and call Namespace.GetSharedDefaultFolder. If the set of mailboxes is always the same, you can add these static mailboxes to the profile (open them as delegate mailboxes) and access them programmatically using the Namespace.Stores collection. Again, Outlook should not be used in a service/scheduler.
Exchange Web Services - it is HTTP based, so you can use it from a service
Graph - just like EWS, it is HTTP based, so you can use it from a service
Extended MAPI (C++ or Delphi only). native API used by Outlook itself. It can be used in a service.
Redemption (I am its author - it wraps Extended MAPI and can be used in any language from a service). It lets you dynamically log to an Exchange mailbox using RDOSession.LogonExchangeMailbox / LogonExchangeHostedMailbox (no existing profile required). Other mailboxes can be opened using RDOSession.GetSharedMailbox.
Yes, you can log on to a specific user profile programmatically. The Logon method of the Namespace class logs the user on to MAPI, obtaining a MAPI session.
Be aware, Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution. You can read more about that in the Considerations for server-side Automation of Office article.
Instead, you may consider using a low level API on which Outlook is built - Extended MAPI. Or use any third-party wrappers around that API.

How do you search all items via Exchange IMAP?

I am trying to perform an IMAP uid_search against an exchange server (office 365) to find all emails to/from a particular email address. The problem is that some clients have a prohibitively large number of folders.
Using active sync, it appears that there is an All Items folder that can search all emails at once: Exchange Web Services (EWS) FindItems within All Folders, however, I do not see the same folder in the IMAP folder list and am having to perform the query against each folder individually.
Is there a way to search all emails in exchange using IMAP without having to search each folder?
I don't have access to an Exchange IMAP server, so I don't have any concrete answer that I can give you.
Instead, I'll have to provide you with some suggestions to look into to answer your own question.
Does Exchange IMAP support the XLIST or SPECIAL-USE IMAP extensions? If so, you can use one of those to query for an "All Items" folder. Unfortunately, I doubt it supports either of those.
Does Exchange IMAP support the MULTISEARCH extension? If so, you can use that to search multiple folders at once.
If it doesn't support any of those IMAP extensions, then you are probably out of luck unless they have a custom extension (I doubt it).

Can you get notes and tasks from Exchange with VB.NET?

I'm currently looking into expanding a project to include the syncing of notes and tasks from a web application with exchange/Outlook.
Though at the moment, this is only an idea.
Unfortunately for me, it's the first time I've considered doing any form of Exchange integration at all from any application.
So I'm wondering, is what I've set out to do even possible?
I'll most likely be using ASP.NET MVC 2, .NET 4 and Exchange 2003.
The old way to do it would be to use Outlook Interop to automate Outlook to get access to the data. However, this isn't the neatest way of doing things, and you almost certainly wouldn't want to do it on a server.
The new way of doing it is using Exchange Web Services, you can find an article here about it, but I'm not sure if they're supported on Exchange 2003...

Intercepting email to add text

I need to automatically add text to emails sent by users. The text CANNOT be added as a signature in outlook, but has to be added after the users click 'send' in outlook. My company uses Microsoft Exchange Server.
Any ideas?
Thanks!
If this is Exchange Server 2007 you can add a thing called a Transport Rule (in the Exchange Management Console) to do this. What you're looking for is called a "disclaimer" since most companies do this so that they can add a legal disclaimer to the bottom of outgoing email.
I would expect that this could be done with a Microsoft Outlook add-in if you have access to be able to distribute such things. Adding it as an addin at the client level may be easier than adding something to the server, and would certainly be less likely to cause problems with the server itself.
If memory serves, Visual Studio allows you the ability to create Microsoft Office addins.
Here's a link to an MSDN article about programming for Outlook 2003 in C#
http://msdn.microsoft.com/en-us/library/aa289167.aspx