read mails from exchange 2010 SP1 server using VB.net
Hi All,
Iam a newbie to this field and iam assigned with a challenging task. I want to create a service in VB.net that helps us to read from exchange 2010 mailboxes. So kindly help me with some examples which can help me.
Re: read mails from exchange 2010 SP1 server using VB.net
Hi,
I have tried using IMAPX component in c# and it is working fine in exchange 2003/2007 but not working in exchange server 2010 SP1. Here is the code that i wrote. kindlyn look below :
private void ReadIMAPEmail()
{
string Mailserver = ConfigurationSettings.AppSettings["MailServer"];
string MailServerPort = ConfigurationSettings.AppSettings["MailServerPort"];
string MailServerUsername = ConfigurationSettings.AppSettings["MailServerUsername"];
string MailServerPwd = ConfigurationSettings.AppSettings["MailServerPwd"];
ImapClient imap = new ImapClient(Mailserver, Convert.ToInt32(MailServerPort), true);
imap.IsDebug = true;
try
{
WriteEventLogEntry("Checking for Server Authentication....");
if (imap.Connection())
//Iam getting the error message here after trying to connect to the server on particar port.But when i verified using telnet it is opening on that port
{
WriteLog("Loggin in to IMAP server.", Color.Green);
bool Islogin = imap.LogIn(MailServerUsername, MailServerPwd);
if (Islogin)
{
WriteLog("Connected to IMAP server.", Color.Green);
Bookmarks