Access Exchange 365 Storage

Add-in Express™ Support Service
That's what is more important than anything else

Access Exchange 365 Storage
 
MirkoB


Guest


Hello alltogether,

I need some advice how to deal with a certain problem.
I am writing a little CRM in Delphi and wanted to include the complete mail conversation between an employee and a customer in the interface.

E-Mails are stored in Exchage 365 online and may be entering on different accounts.

I do not really know what is the best way to archive this but I am thinking in two different directions.

1: The employee is marking an email from a customer in Outlook 365, using a custom button from a context menu popping up when reading the email and pressing the right mouse button, by adding a custom code at the end of the email body. This code certifies that this email belongs to a certain customer and can be identified in the CRM by searching the exchange store for this mark. Every email belonging to this conversation is automatically tagged on arrival.

2: The employee is extracting the email information, using a custom button from a context menu popping up when reading the email and pressing the right mouse button, into an sql table having the customer code from the CRM in a seperate column. So the emplayee is virtaully attaching the email to the customer in the CRM.
Every email belonging to this conversation is automatically extracted into the SQL table on arrival.

Concerning 1:
Is there a chance to access the email body and add the code at the end of it?
Can I access the office 365 storage in some way from delphi?
How do I do this when the emails are arriving on different accounts?

Concerning 2:
Seems to be a lot easier to me but I am losing all attachments.
I know that you got an event for checking arriving emails like onNewItem or alike which I wanted to use to check whether this email belongs to a certain conversation or not (also important for point 1).

For both points: I would like to check the Exchange 365 storage even if Outlook 365 is not open.
So when a new email comes in and is part of a certain conversation I would like to see it already in my CRM without having to see the emails first in Outlook. I could perhaps program something a little "agent" checking the inboxes.
I could also check the email adress of the sender to attach it to the right customer but what about the fact when he or she is writing from two or more different adresses?

I would be gracious if you could give me your opinion or a hint or another approach to this problem.

Thanks and best regards to Belarus.

Mirko
Posted 04 Oct, 2019 14:04:18 Top
Andrei Smolin


Add-in Express team


Posts: 18806
Joined: 2006-05-11
Hello Mirko,

When using a COM add-in you are limited: the add-in isn't loaded and it cannot work if Outlook is turned off.

MirkoB writes:
E-Mails are stored in Exchage 365 online and may be entering on different accounts.


If different accounts are in the same Outlook profiles, then your add-in is able to find this out. If the accounts are in different Outlook profiles, you should have your add-in registered with these Outlooks (=on these machines) as well.

MirkoB writes:
Is there a chance to access the email body and add the code at the end of it?


Of course.

MirkoB writes:
Can I access the office 365 storage in some way from delphi?


Not sure. I assume you talk about accessing Exchange Web Services. Looking at the name of it you should be able to.

MirkoB writes:
Seems to be a lot easier to me but I am losing all attachments.


I'm sorry, why this occurs?

MirkoB writes:
I know that you got an event for checking arriving emails like onNewItem


I strongly suggest that you check https://www.add-in-express.com/creating-addins-blog/2011/11/10/outlook-newmail-custom-solution/. Although the solution is given in C#, you can develop the same machinery in Delphi.

MirkoB writes:
I could also check the email adress of the sender to attach it to the right customer but what about the fact when he or she is writing from two or more different adresses?


There's no simple solution to this. You will have to invent some way to let you find out whether two (or more) email addresses belong to the same person.


Andrei Smolin
Add-in Express Team Leader
Posted 07 Oct, 2019 06:08:53 Top
MirkoB


Guest


Hello Andrei,

thanks for the advice.
I diskussed the issue with my work mates and they are willing to tag every email manually inside Outlook 365, so this faciliates a lot of things.

So solution found...

Best regards

Mirko
Posted 08 Oct, 2019 09:55:33 Top
Andrei Smolin


Add-in Express team


Posts: 18806
Joined: 2006-05-11
Thank you for sharing the solution with forum readers!


Andrei Smolin
Add-in Express Team Leader
Posted 09 Oct, 2019 03:55:00 Top