Petrović, Aleksandar
2020-05-25T09:43:00Z
Hello,

Company on upwork have tasked me to do research. What they need is:

,,A basic console application that once runs it will connect to my outlook office 365, search for emails for subject "my subject" and then extract that comes out after the ":" and save it to a database. It should also then delete the email that had that information. There are 30 thousand emails so ability to select ranges will be needed so not to crash the application.

Client Code: AA
Client Name: mytest
User Name: Court Zoller
User Email: mytestemailverizon.net
Property Name: Anna Maria Property
Reservation Number: 103773ee52
Reservation Guest Full Name: John Johnson
Check In Date: 6/12/2018
Check Out Date: 6/17/2018 "

I Googled out Genius work that should be able to do what is required. My first question is can do it?

I am trying to achive this entire weekend and I can't figure it out how to connect database with my outlock. Additional problem is that I am using Gmail, so I had to simulate outlook by linking it to my Gmail account.

There is big chance that company that tasked me will purchase the licence from you if you provide clear instructions how they can do the task. They don't have time to figure things out, and I am confused and most certain lack proper software to clear things up.

Thank you.
Sponsor
GeniusConnect documentation search (User Manual Downloads...)
Administrator
2020-05-25T11:11:00Z
Hello,


It should be possible with these configuration steps:

-Create a table in your DB for email storage
-in GeniusConnect map your Folder to the table and click OK
-on GeniusConnect Config->Datababase Tab, select the folder -> click More Actions - >Advanced - > Add/Edit Outlook Filter , and add your subject filter, example :
@SQL="urn:schemas:httpmail:subject" LIKE '%my subject%'
-If you like to delete the email after saving to DB :
on GeniusConnect Config->Datababase Tab, select the folder -> click More Actions - >Advanced - > Delete After Saved to DB:Delete from folder



After these steps complete emails with "my subject" in subject will be stored in your table and deleted from the Folder.


To extract data from email body you can create for example a View , like this (SQL Server syntax):

SELECT 
SUBSTRING(MailBody, CHARINDEX('Client Code:', MailBody, 1) + 12, 3)  as ClientCode,
SUBSTRING(MailBody, CHARINDEX('Reservation Number:', MailBody, 1) + 19, 20)  as ReservationNumber
FROM myStagingMail


Please note this is only example code, it may be better to create for example a stored procedure and functions to extract the data into a new table, or do the extracting in insert trigger, more info :
https://support.geniusconnect.com/Posts/t59- 

More Info Outlook Filters:
https://support.geniusconnect.com/Posts/t192- 
Petrović, Aleksandar
2020-05-25T13:12:00Z
Thank you for quick response,

I have been reading manual and watching your instructional videos and I can't understand your instructions. I will need to pass the instructions to somebody on another continent who doesn't have time to read manuals or figure things out. I will send the link to this forum to them, and lets hope it will work out.