Understanding Incoming Email

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Gabbitas
Posts: 334
Joined: Sun Jan 03, 2010 3:36 am

Understanding Incoming Email

Post by Gabbitas »

Hi,

I'm currently setting up incoming email for my application and was wondering if anyone could shed some light on a couple of things I don't understand...

Firstly, I have set it up and have successfully managed to use the CONNECT TO EMAIL and DISCONNECT FROM EMAIL functions. All email is downloaded and ReceivedEmail object is created for each email. Now what I don't understand is how does AwareIM and the Email server know what email has been downloaded and what hasn't?

Imagine this.....

My application connects to the email server based on incoming email settings stored in the regular user.It downloads everything (in my case it was 30,000 emails)
My application then processes those emails and INSERTS them into Clients.Communication
The emails that are not inserted into any Client get deleted

So my two questions are these:

1) Does my application / AwareIM know not to download the deleted emails again? If so how?
2) Is there any way to download email from, say, the last two weeks and not all time(meaning only 100 emails are downloaded and not 30,000!) when a new regular user is created?

Thanks
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Understanding Incoming Email

Post by hpl123 »

I am also interested in knowing more about how this works. Can someone who uses mail a lot share a bit more details? Thanks
Henrik (V8 Developer Ed. - Windows)
ninap
Posts: 186
Joined: Wed Mar 17, 2010 6:45 pm

Re: Understanding Incoming Email

Post by ninap »

i also would love to better understand the handling -

- if anyone has a more concrete understanding of the behind the scenes that would very much help
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

Re: Understanding Incoming Email

Post by mrbdrm »

i am at this stage too.
how do we don't process the same email every time we connect to email? and how to mark emails as readed?
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

Re: Understanding Incoming Email

Post by mrbdrm »

more questions when using IMAP protocol:

can we use IMAP idle?
can we chose witch IMAP folder to load emails from?
can we add/delete/rename IMAP folders?
intra
Posts: 279
Joined: Thu Oct 11, 2012 1:30 pm
Location: Australia

Re: Understanding Incoming Email

Post by intra »

Noticed that this thread went quiet, i too would like to know some more specifics regarding incoming email method.
Avid Linux user....
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Understanding Incoming Email

Post by aware_support »

All Aware IM does is listen for any new messages that appear on the email server. The server sends a notification to Aware IM when the email arrives and Aware IM handles it. Emails are only read from the server once.

There is no support for deleting/renaming etc of IMAP folders or emails.
Aware IM Support Team
Gabbitas
Posts: 334
Joined: Sun Jan 03, 2010 3:36 am

Re: Understanding Incoming Email

Post by Gabbitas »

Support,

When connecting to a new email account for the first time, is there a way to limit the amount of emails that AwareIM will download? For example, just the last two weeks and not email from all time?

Thanks
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Understanding Incoming Email

Post by aware_support »

No, not at the moment
Aware IM Support Team
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

Re: Understanding Incoming Email

Post by mrbdrm »

so if the email is have over 100k emails and i connected with awareim, will aware pull all the emails?
if so, in witch order?
if i have another email client also connected to the same email, will aware mark the opened email as read?
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Understanding Incoming Email

Post by aware_support »

Code: Select all

so if the email is have over 100k emails and i connected with awareim, will aware pull all the emails?
If they are unread on the server then yes.

Code: Select all

if so, in witch order? 
The order is undefined

Code: Select all

if i have another email client also connected to the same email, will aware mark the opened email as read?
I think so, but not sure
Aware IM Support Team
Gabbitas
Posts: 334
Joined: Sun Jan 03, 2010 3:36 am

Re: Understanding Incoming Email

Post by Gabbitas »

When connecting to a new email account for the first time, is there a way to limit the amount of emails that AwareIM will download? For example, just the last two weeks and not email from all time?
Post by aware_support » Fri Sep 02, 2016 8:02 am

No, not at the moment
Support,

Would it be possible for you to add this functionality in at some point please?

Having the system download thousands of emails when a new user enters his incoming email credentials for the first time puts a huge strain on my systems resources for extended periods of time. I'm fearful of if/when I have 10 users doing this at the same time...with no limits in place I'm worried my app may crash and burn!

Thanks
RLJB
Posts: 914
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Re: Understanding Incoming Email

Post by RLJB »

Well, 6 years later has anyone cracked this yet? I'm super interested.

Use case:

We have basically a CRM, the users wants to "sync" emails, so if they open a Customer record in our AwareApp they can see the emails sent to and received from this Customer (even if they sent them in Outlook or Gmail).

I'm guessing... like Incoming Email feature in Aware now but IMAP into a mailbox and grab a folder (?) or be able to see in Sent and Inbox folders to process them (?) or is there some 3rd party API anyone knows about to do this.

Has anyone implemented such a thing and would like to share the love/wisdom?
Rod. Aware 8.6 (latest build), Developer Edition, on OS Linux (Ubuntu) using GUI hosted on AWS EC2, MYSQL on AWS RDS
eThinkSolutions
Posts: 2
Joined: Mon Aug 01, 2022 2:26 am

Re: Understanding Incoming Email

Post by eThinkSolutions »

Rod, how did you go with this? We are looking at implementing something similar. Have you had any success or does anyone have any experience with this that they would like to share.
RLJB
Posts: 914
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Re: Understanding Incoming Email

Post by RLJB »

Sorry I just saw this... yeah we cracked, not how we expected though.

1) background we use AWS and Lambda functions a bit outside of Aware, so that is what we use here

2) developed in Aware a Service using oAuth to Outlook to get a token to acccess a users mailbox

3) developed a Lambda function using Python to use the token and access the mailbox of the user every 15 mins, it looks for a specifically categorised emails in manly folders (Inbox, Sent etc), if it sees on it grabs it and pushes it into an AwareIM table

It works, it's a bit of effort though.
Rod. Aware 8.6 (latest build), Developer Edition, on OS Linux (Ubuntu) using GUI hosted on AWS EC2, MYSQL on AWS RDS
Post Reply