ImapX 2 is a crossplatform IMAP library for .NET, supporting SSL/TLS, OAuth2 and all major GMail IMAP extensions. It's the only IMAP library which supports all .Net 2.0 - 4.5, Mono and Windows Phone 7.1 and 8.0.
Questions tagged [imapx]
42 questions
3
votes
1 answer
Downloaded email attachment is not saved correctly using ImapX and C#
I am writing a program in C# to access the UNREAD emails from Gmail using ImapX (Version 2.0.0.13). I wish to download specifically the powerpoint (.ppt or .pptx) files in the attachment. I have made the download of attachment work.
However, the…

Himanshu Verma
- 257
- 1
- 3
- 10
3
votes
2 answers
imapX marking a message as read in Gmail?
I'm using ImapX to read a Gmail email account and after reading them, I'd like to mark them as 'read'
As I understand it, others have been successful with:
ImapX.FolderCollection folders = imapclient.Folders;
ImapX.MessageCollection messages =…

user1484054
- 31
- 1
- 3
2
votes
1 answer
Powershell - Download Attachment from Gmail
So this is what I did so far:
$dll = 'C:\Users\xxxx\Desktop\v4.6\imapx.dll'
[Reflection.Assembly]::LoadFile($dll)
$Username = "xxxxxx"
$Password = "yyyyyy"
# Initialize the IMAP client
$client = New-Object ImapX.ImapClient
###set the fetching…
user6496229
2
votes
2 answers
Unexpected characters returned when reading email using ImapX
When reading the body of an email using ImapX there is unexpected text at the end. A simplified version of the code is
using (var imapClient = new ImapClient(host, port, useSSL))
{
if (!imapClient.Connect())
throw new…

Andy Nichols
- 2,952
- 2
- 20
- 36
2
votes
2 answers
How i can clear IEnumerable?
I downloaded all the messages and checked their attachment . They are filling RAM. I am called that code in threads. I am try to use client.Dispose() and GC.Collect() but is is not helped :((
using (var client = new ImapClient(hostname, true))
{
…

Someone
- 95
- 1
- 13
2
votes
3 answers
Getting unread count from gmail using C#
I've been trying to get the count of unread emails in Gmail but I'm encountering some problems. I did a search and I found ImapX library that should help me achieve this, but the code I found here on StackOverFlow on previews questions doesn't work.…

Noam Bergauz
- 21
- 2
2
votes
1 answer
ImapX can't login to local hMailServer from my application, but Thunderbird can
I have a local hMailServer instance, which I would like to connect to. I've successfully used ImapX for example for connecting to GMail or different mail servers, but simply cannot get the authentication work for this simple local hMailServer. I've…

Zoltán Tamási
- 12,249
- 8
- 65
- 93
1
vote
1 answer
IMapX Gmail SEARCH operation throws exception "Bad or not correct search query"
I have used the ImapX library to SEARCH Gmail using queries like :
ImapX.MessageCollection msg= c.Folders["INBOX"].Search("SUBJECT ", false);
I get the error above when I try and retrieve a message using
MessageCollection msg=…

Matt Evans
- 7,113
- 7
- 32
- 64
1
vote
3 answers
How to get all folders name of gmail using ImapX lib? C#
How to get all folders name of gmail using ImapX lib?
I read in http://hellowebapps.com/2010-02-09/imapx-net-library-to-manage-imap-folders/ but not found get all folder part.

giaosudau
- 2,211
- 6
- 33
- 64
1
vote
0 answers
IMAPX - Downloading .GZ - GZip Files
When Downloading .gz files using IMAPX 2.0.0.18 I cannot extract the files as it shows them as corrupt. This happens when the file is under Message Attachments, when the same file is under Message Embedded it works fine.
I am using IMAPX with C# and…
1
vote
1 answer
Downloading email messages with IMAPX
I just started using the open-source library called IMAPX to interact with my IMAP mailbox. I am following this article on CodeProject. I can login properly and retrieve the email folders. But the problem is, the article seems to be incomplete which…
user9404499
1
vote
1 answer
OnNewMessagesArrived never gets triggered
This is my simplified code:
using ImapX;
private ImapClient Client { get; set; }
private void SetupListener(string mail, string password)
{
Client = new ImapClient();
Client.Connect("imap.gmx.net", 993, true);
// Client.IsConnected ==…

C4d
- 3,183
- 4
- 29
- 50
1
vote
0 answers
ImapX Very slow in retriving gmail Inbox
I am trying to retrieve gmail inbox list. It takes ages to retrieve the list.
Even after making min load call.
client.Behavior.AutoDownloadBodyOnAccess = false;
client.Behavior.AutoPopulateFolderMessages = false;
…

S Lal
- 71
- 3
1
vote
0 answers
Can't Login using ImapX from Azure WebJob
I have an application that uses the Imapx library (https://imapx.codeplex.com/) to connect to a Gmail account to download and process email messages. The application works fine on my PC, but when I publish my application to an Azure WebJob, the…

Brent Lewis
- 11
- 1
1
vote
1 answer
How to Filter with UID in IMapX
I can successfully filter mails using these filters
imapXInboxFolder.Messages.Download(
"SENTBEFORE 02-Feb-2016",
ImapX.Enums.MessageFetchMode.Tiny, 1
);
// To get 1 mail sent before the…

Abdul Saleem
- 10,098
- 5
- 45
- 45