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

No type "Mailmessage" in Mono C# .net core linux application #158

Open
DavideC84 opened this issue Aug 10, 2019 · 2 comments
Open

No type "Mailmessage" in Mono C# .net core linux application #158

DavideC84 opened this issue Aug 10, 2019 · 2 comments

Comments

@DavideC84
Copy link

DavideC84 commented Aug 10, 2019

Hello everyone, new on Git, just registered to post this.

I am a developing some stuff on Linux, with Mono and C# .net
I've imported S22 libraries with Nuget but i'm having a bit of a problem that it's crushing my head.
This is the very simple code:

`

public class Mail
{
    ImapClient Client;

    public string Connect(string host, int port, string user, string pwd)
    {
        try
        {
            Client = new ImapClient("imap.gmail.com", 993, user, pwd, AuthMethod.Login, true);
            if (Client != null)
            {
                Console.WriteLine("Connected");
            }
        }

        catch (Exception e)
        {
            return e.ToString();

        }

        return "OK";       
    }

    public void Fetch()
    {

        IEnumerable<uint> uids = Client.Search(SearchCondition.All());
        IEnumerable<MailMessage> messages = Client.GetMessages(uids.FetchOptions.HeadersOnly);
    }

`
The problem lies in the Fetch() block (connection works great). I can't compile because of the "IEnumerable messages" declaration. Mailmessage is not a valid type and it's not a class exposed by the S22.Imap lib...
I can also use linting and let the compiler show me all the classes available but no MailMessage anywhere.
It's so strange i guess is just i'm missing something.. anybody has a clue?

Thanks!
Davide

@DavideC84
Copy link
Author

Hi.
Yeah man, i probably didn't notice it was a dead project at that time (two years ago).
One hour after posting this i've ended up using MailKit indeed.
Thanks anyways :-)

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
@DavideC84 and others