more G-Labs products

Author Topic: Imap/Pop Client to fetc mail in HG and import third party class library c#  (Read 1024 times)

September 08, 2015, 08:19:14 AM
Read 1024 times

maccosx

  • *
  • Information
  • Newbie
  • Posts: 14
Hi,

i configured the eMail account to send mail (i had problems with Gmail account so i switch to another free email service but that's another issue). I 'm now able to send email but i don't understand if there is already the possibility to fetch email with POP or IMAP directlu from within HG.

Looking at NetHelper.cs source corde i see there is a sort of IMAP client helper declared but then its not used anymore anywhere.

Code: [Select]
#region IMAP client

        /// <summary>
        /// IMAP mail client helper.
        /// </summary>
        /// <returns>The IMAP client.</returns>
        /// <param name="host">Host.</param>
        /// <param name="port">Port.</param>
        /// <param name="useSsl">If set to <c>true</c> use ssl.</param>
        public ImapClient ImapClient(string host, int port, bool useSsl)
        {
            return new ImapClient(host, port, useSsl);
        }

        #endregion

So, the question is, can i retrieve mail with HG using POP3 or IMAP ?
If not, is it possible to import third party classes to start using already developed pop/imap client for c#?

Thanks
Cristiano

September 08, 2015, 11:12:01 AM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
It's not currently possible to import libraries in a CSharp program. It is possible by using Python or Ruby though:

http://stackoverflow.com/questions/18427775/how-to-load-dll-using-iron-python
http://www.ironshay.com/post/Starting-Using-IronRuby-in-25-Minutes.aspx

The imap client used in the NetHelper has never been tested.
This is the underlying class used by it:

https://github.com/genielabs/HomeGenie/blob/master/MigFiles/SupportLibraries/NetClientLib/ImapClient.cs#L72

In the future I was thinking to allow importing other libraries in a csharp program. A good candidate for mail functionalities could be:

https://github.com/jstedfast/MailKit

g.

September 08, 2015, 01:52:12 PM
Reply #2

maccosx

  • *
  • Information
  • Newbie
  • Posts: 14
Thanks for the infos Gene,

i'm trying to test imapclient and i found that you misspelled "Authenticate" method in

https://github.com/genielabs/HomeGenie/blob/master/SupportLibraries/NetClientLib/ImapClient.cs

you wrote "Authenicate"...

I will continue with the test now