Quantcast
Channel: ImapX 2
Viewing all 1952 articles
Browse latest View live

New Post: Support for outlook oaut2.0

$
0
0
Hi! do you want to include support for imap with oauth 2.0 authentication for outlook? in your example for download I added the support for oauth 2.0 for outlook but I dnn't understand how to set the cofiguration for outlook here is the link
https://msdn.microsoft.com/en-us/library/dn440163.aspx

Your app/server passes the access token to our IMAP service in the AUTHENTICATE command. We accept a base64-encoded string that contains:
The user name.
The authentication type Bearer for direct OAuth 2.0 requests.
The access token granted by MSA.
For example, your app/server would base-64 encode this string:
user={user@domain.com}^Aauth=Bearer {Access Token}^A^A

The example on the links is this

[connection begins]
C: 000 CAPABILITY
S: * CAPABILITY IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2
S: 000 OK CAPABILITY completed
C: 001 AUTHENTICATE XOAUTH2
S: +
C: {base64-encoded string}
S: * CAPABILITY IMAP4rev1
S: 001 OK OAuth authentication successful
[connection continues]

I change the example added the user and the access token but in you SendAndReceive method doesn't conect I don't know how

If you want I can pass your code example with the modifications for oaut2.0 with outlook

Commented Unassigned: Downloaded TXT attachments lost format [2611]

$
0
0
Hello!

I have found a issue, i can't get txt files without getting them unaltered

my code
```
foreach (var file in m.Attachments)
{
file.Download();
file.Save(pathf /*, optional file name*/);
}
```

http://puu.sh/eMoSn/88051273aa.png

left is original file
right is original file downloaded

by the way i am using gmail with imapx version 2.0.0.16

Kind Regards
Comments: ** Comment from web user: DJ_Tomato **

bump?

New Post: DownloadRawMessage ok without raw

$
0
0
Hi antferr,

can you give more details on the server you are using?

Greets,

Pavel

New Post: Support for outlook oaut2.0

$
0
0
Hi apis3445,

when connecting using OAuth2, all you need is to pass the user email as well as the access token in the credentials:
var account = "test@outlook.com";
var accessToken = "your access token for outlook.com"

var client = new ImapClient("imap-mail.outlook.com", true);
if(client.Connect()) {
     client.Credentials = new OAuth2Credentials(account, accessToken);
     if (client.Login()) {
           // success, you can work with your IMAP account now
     }
}                
I added a sample for using Outlook.com OAuth2 in the latest source code (See the C# sample application).

Before you get started, make sure you registered your application at https://account.live.com/developers/applications/index. This is required to get your own Client ID and secret.

Greets,

Pavel

Source code checked in, #41951

$
0
0
- Added Outlook.com OAuth2 example

New Post: ImapX freezes after idling for a while

$
0
0
Hi,
this seems to be a problem, when the server sends "OK still here" during idling.

ImapX "thinks" that Idling has stopped, if the server sends somethink with "OK" during idling.

You can change the source code in ImapBase.cs in the WaitForIdleServerEvents() function as follows:

from:
if (tmp.ToUpper().Contains("OK"))
{
    _idleState = IdleState.Off;
    // unblock the processing thread, it will end itself because _idleState is Off
    _idleEventsResetEvent.Set();
    return;
}
to:
if (tmp.ToUpper().Contains("OK IDLE COMPLETED"))
{
    _idleState = IdleState.Off;
    // unblock the processing thread, it will end itself because _idleState is Off
    _idleEventsResetEvent.Set();
    return;
}
Hope this helps,
Michael

Created Unassigned: Dovecot and Idling [2624]

$
0
0
Hi,
first: great job on ImapX! It saves many hours of work out of the box.
I found an issue while idling using dovecot as imap server.
The server sends periodically "OK still here" while idling. ImapX interprets this as Idling has ended. I found a solution described here:

[https://imapx.codeplex.com/discussions/576899](discussion)

but this may only work with dovecot.
Regards,
Michael

New Post: Support for outlook oaut2.0

$
0
0
Hi! thank you! Yahoo now supports oauth 2.0 would you like to include an example for yahoo please?

New Post: Message as bodypart

$
0
0
Hello,

I have a problem with imapx message class, some of my mail arrive with one or more sub-message as eml file in attachment (in one specific case every sub-message is stored in "bodyparts" component of message class).
How i can load this message to save his attachment?

thank you for the reply
(p.s. i'm very sorry for my very horrible english :D)

New Post: ImapX freezes after idling for a while

$
0
0
Hi Michael,

thank you! I included your fix in the latest source code.

Greets,

Pavel

Source code checked in, #42027

$
0
0
- Include fix for idle mentioned in https://imapx.codeplex.com/discussions/576899 by Michael (Ikarus76)

Commented Unassigned: System.OutOfMemoryException [2593]

$
0
0
This is using the sample application, the exception occurs when loading email

System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at System.Text.StringBuilder.ExpandByABlock(Int32 minBlockCharCount)
at System.Text.StringBuilder.Append(Char value, Int32 repeatCount)
at System.Text.StringBuilder.Append(Char value)
at ImapX.Parsing.BodyStructureParser.ReadQuotedString(Boolean trimSpaces) in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Parsing\BodyStructureParser.cs:line 317
at ImapX.Parsing.BodyStructureParser.ReadString(Boolean trimSpaces) in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Parsing\BodyStructureParser.cs:line 265
at ImapX.Parsing.BodyStructureParser.ReadLanguage() in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Parsing\BodyStructureParser.cs:line 255
at ImapX.Parsing.BodyStructureParser.ParsePart(Int32 number, Int32 level) in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Parsing\BodyStructureParser.cs:line 201
at ImapX.Parsing.BodyStructureParser.Parse(Int32 level) in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Parsing\BodyStructureParser.cs:line 42
at ImapX.Parsing.BodyStructureParser.Parse(Int32 level) in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Parsing\BodyStructureParser.cs:line 38
at ImapX.Message.TryProcessBodyStructure(String data) in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Message.cs:line 451
at ImapX.Message.ProcessCommandResult(String data) in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Message.cs:line 243
at ImapX.Message.NormalizeAndProcessFetchResult(IList`1 data) in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Message.cs:line 586
at ImapX.Message.Download(MessageFetchMode mode, Boolean reloadHeaders) in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Message.cs:line 554
at ImapX.Folder.Fetch(IEnumerable`1 uIds, MessageFetchMode mode) in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Folder.cs:line 441
at ImapX.Folder.Search(String query, MessageFetchMode mode, Int32 count) in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX\Folder.cs:line 486
at ImapX.Sample.FrmMain.GetMails() in C:\Users\uxsoft\Downloads\ImapX 2.0.0.16 Source code (sample application included)\ImapX.Sample\FrmMain.cs:line 457
Comments: ** Comment from web user: yefka **

I had this issue while reading one specific e-mail with a .eml attachement.
No problem with the other emails.

Source code checked in, #42029

$
0
0
- Added support for vendor field in oAuth2 credentials - Added sample for Yahoo oAuth2 authentication

New Post: Support for outlook oaut2.0

$
0
0
Hi apis3445,

I added a sample for Yahoo in the latest source code. Basically you will get the following information from Yahoo:
access_token
xoauth_yahoo_guid // use this as the login name
However, Yahoo requires one more field for authentication, the vendor name. using latest code you can now pass it when creating the OAuth2Credentials object:
var xoauthYahooGuid = "your xoauth_yahoo_guid received in the auth process";
var accessToken = "your access token for yahoo"

var client = new ImapClient("imap.mail.yahoo.com", true);
if(client.Connect()) {
     client.Credentials = new OAuth2Credentials(xoauthYahooGuid, accessToken, "ImapX");
     if (client.Login()) {
           // success, you can work with your IMAP account now
     }
}   
Greets,

Pavel

New Post: Cannot save Attachements

$
0
0
Was this problem ever fixed? I'm getting the same error (stack trace below) when I try to save attachments sent via GMail, Yahoo, etc. I have the 5/1/2014 version of ImapX.dll so I'm wondering if the problem was not fixed, or if I might be doing something wrong. My download/save code is the same as the original post above so I'm thinking it might not be me.
   at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)
   at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
   at System.Convert.FromBase64CharArray(Char[] inArray, Int32 offset, Int32 length)
   at System.Security.Cryptography.FromBase64Transform.TransformBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[] outputBuffer, Int32 outputOffset)
   at ImapX.EncodingHelpers.Base64.FromBase64(String s) in c:\Users\Pavel\Projects\ImapX\ImapX\EncodingHelpers\Base64.cs:line 107
   at ImapX.Attachment.get_FileData() in c:\Users\Pavel\Projects\ImapX\ImapX\Attachment.cs:line 47
   at ImapX.Attachment.Save(String folder, String fileName) in c:\Users\Pavel\Projects\ImapX\ImapX\Attachment.cs:line 136
   at WindowsApplication1.clsEmailMessages.saveMessageAttachments(Int32 dbID, String[] FileToSaveList, String SaveToFolder, Boolean AutoOverwrite) in C:\Users\Rick\Documents\Visual Studio 2013\Projects\WindowsApplication1\WindowsApplication1\clsEmailMessages.vb:line 170
   at WindowsApplication1.SaveAttachments.btnSave_Click(Object sender, EventArgs e) in C:\Users\Rick\Documents\Visual Studio 2013\Projects\WindowsApplication1\WindowsApplication1\SaveAttachments.vb:line 67

New Post: Cannot save Attachements

$
0
0
Hi rickgriffith,

there were some fixes for this issue after the release on May 1st 2014. Take a look at the latest source code: https://imapx.codeplex.com/SourceControl/latest

If you don't want to compile the library yourself, just let me know which .Net version you are using.

Greets,

Pavel

Edited Unassigned: Dovecot and Idling [2624]

$
0
0
Hi,
first: great job on ImapX! It saves many hours of work out of the box.
I found an issue while idling using dovecot as imap server.
The server sends periodically "OK still here" while idling. ImapX interprets this as Idling has ended. I found a solution described here:

[https://imapx.codeplex.com/discussions/576899](discussion)

but this may only work with dovecot.
Regards,
Michael

Closed Unassigned: Unable to get Folders [2594]

$
0
0
Here is the debug output:
```

IMAPX1 CAPABILITY

* CAPABILITY IMAP4rev1 UIDPLUS CHILDREN ID XLIST NAMESPACE IDLE AUTH=PLAIN
IMAPX1 OK CAPABILITY completed.
IMAPX2 LOGIN "XXXXX" "YYYY"

IMAPX2 OK Success.
IMAPX3 XLIST "" %

* BYE Internal error.

```

Oddly enough; it does work for other accounts to the same server.

Any ideas?

New Post: Cannot save Attachements

$
0
0
That did the trick. I was able to download and compile the source code and all seems well.

Thanks Pavel!

Rick

New Post: SUBJECT,FROM, TO, CC, BCC and ATTACHMENT NAME fields are NOT decoded CORRECTLY

Viewing all 1952 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>