Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

email message returning null on 1st call. #63

Open
kalzon1 opened this issue Apr 11, 2017 · 1 comment
Open

email message returning null on 1st call. #63

kalzon1 opened this issue Apr 11, 2017 · 1 comment

Comments

@kalzon1
Copy link

kalzon1 commented Apr 11, 2017

Hello again.

Ran into another odd issue. Had a user have another problem getting an email. Had them forward it to me and I too saw the issue with the forwarded email.

When using the Async methods it returns a null message (imapClient.GetMessagePartialHelper line 2384
response = await ReadDataAsync(commandTag, "FETCH"); returns "0 obj " not anything containing rn so it return null.

In the Form1.ImapMessageList_SelectedIndexChanged( ) if I put an if in If (message == null)) I can try again

if (message == null)
{
//try again
// Resume idling.
await myImapClient.IdleStartAsync();

                                // Stop idling to resume commands.
                                if (myImapClient.IsIdle)
                                    await myImapClient.IdleStopAsync();

and rerun the logic
and it works fine.

I however can not seem to do this if run the non-async methods.

Any thoughts on how it can be pulled not as null or make a similar non-async process work like the above. I can try sending you the email.

(I don't know how this one person keeps getting legit businesses sending these odd email formats)

@bertjohnson
Copy link
Owner

Hi kalzon1, thanks for this report.

I'm trying to recreate this, but have not been successful yet. I suspect this is related to the IDLE command. Without understanding the cause, I'm not sure of the best approach.

The synchronous method merely wrap the asynchronous results and parse the .Result, so I'm not sure why behavior would be different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants