profiles in pop3

G

Guest

Hello Everyone,

I really need help in this email. I am using pop3 service to connect to
microsoft exchange. I have two profiles defined
in microsoft exchange.
One is west1 and another one is west2.

When I am trying to connect to west1.
I can succesfully connect to the excahnge mail box, but if i try to connect
to another west2 profile then
I get an error that server does not exists. Although in microsoft exchange
itself, I can successfully connect to both the profiles.
I am having problem in the code.


Below is the code for connecting to the server, but I don't know where
should I define the profile.

private void serverConnection(string userName, string password, string
serverName, DataRow dr1, DataRow dr)
{

long msgNumber;
string strMessage;
Pop3 obj = new Pop3();
obj.Connect(serverName, userName, password);

}


public void Connect(string server, string username,
string password)
{
string message;
string response;

Connect(server, 110);
response = Response();
if (response.Substring(0, 3) != "+OK")
{
throw new Pop3Exception(response);
}

message = "USER " + username + "\r\n";
Write(message);
response = Response();
if (response.Substring(0, 3) != "+OK")
{
throw new Pop3Exception(response);
}

message = "PASS " + password + "\r\n";
Write(message);
response = Response();

if (response.Substring(0, 3) != "+OK")
{
throw new Pop3Exception(response);
}



}


In the show profile box of microsoft outlook, I have defined under "When
starting microsoft outlook use this profile" west2.

Can anyone please tell me where can I define the profile and succesfully
connect to the excahnge server or if there is any other way to connect to
different profiles.



Any help will be greatly appreciated.
 
R

RobinS

Don't multi-post. If you're going to post to multiple groups, post them all
at once, so if someone answers it, the other groups can see the answer and
people there know they can spend their time helping someone else.

Robin S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top