var client = new ImapClient("imap.1and1.com", true);
if(client.Connect()) {
if(client.Login(project.Variables["Login"].Value, project.Variables["Password"].Value)) {
client.Behavior.MessageFetchMode = MessageFetchMode.Basic
// login successful
}
}
else {
// connection not successful
}