Click here to Skip to main content
15,917,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,

I am using IMAP tto read mail from gmail for which I downlaod dll with 30days trial pack.

IS IMAP DLL is in some where in .NET

OR

Can I get IMAP dll without purchasing It?

Please Reply
Posted
Updated 12-Apr-13 0:30am
v2

Hello Neetesh,

You could have searched this very site. Any way I am giving you two links which will help you in removing dependency on third party dll.

Regards,
 
Share this answer
 
Comments
Neetesh Agarwal 12-Apr-13 6:55am    
Sorry I searched this after the qns posting by your link u give two days ago.

Thanks
IMAPLib is .Net framework 4.5 IMAP library which is absolutely free.
It offers full control on folders and emails.

http://eximiussoftsolutions.com/Downloads.aspx[^]

See the example -

using ESS.Network.IMAP;

ImapClient objclient = new ImapClient();
objclient.UserName = "******@gmail.com";
objclient.Password = "*******";
objclient.Port = 993;
objclient.Host = "imap.gmail.com";//"imap.****.****.com";
if (objclient.Connect())
{
    if (objclient.SetFolder("Inbox"))
    {
        Dictionary<string, string> messageIds = objclient.SearchMails(ESS.Network.eMailStatus.ALL);

        IDictionaryEnumerator ienum = messageIds.GetEnumerator();
        while (ienum.MoveNext())
        {
            string messageId = (string)ienum.Key;
            string msguid = (string)ienum.Value;

            string emlstr = string.Empty;
            objclient.GetMail(messageId, ESS.Network.eMailIdType.MESSAGEID, ref emlstr);
            //emlstr - contains entire email
        }

    }
}
 
Share this answer
 
v2
Comments
Alkyy 23-Feb-17 3:43am    
That site is taking an extremely long time to load, is that just me or?
Nevertheless I'll try it out, also note that there is another great imap client for C# which enables both email and folder manipulation.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900