i want to ask that how i can read gmail inbox using impax with MVC? i have searched the documentation but couldn't find any solution, i'm sharing my code i have done so far.
public void getMessage()
{
var client = new ImapClient("imap.google.com", true, true);
client.Port = 993;
if (client.Connect())
{
if (client.Login("sabc@gmail.com", "12451susa"))
{
// login successful
}
}
else
{
ModelState.AddModelError("", "Connection Failed");
}
}
i want to fetch the emails in inbox and display them in my view.