Click here to Skip to main content
15,888,330 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,

i need to read emails from an email id with net4 mail server.

am using s22.dll to read and send mails.it worked perfect with gmail and yahoo acccounts.

But now gets error "The handshake failed due to an unexpected packet format." when i change host name for net4 mail server.

Any help..?

What I have tried:

_server = "smtp.net4india.com";
_user = "whstockreports@gesaindia.com";
_password = "123";

using (ImapClient Client = new ImapClient(_server, 25,
_user, _password, AuthMethod.Login, true))
{
IEnumerable<uint> uids = Client.Search(SearchCondition.Unseen().And(
SearchCondition.Subject("New Edi HPL")));
}
Posted
Updated 18-May-17 1:33am

1 solution

SMTP is for sending email, not reading it. You can't use IMAP against an SMTP server, you need to find the relevant IMAP server for that mail host or failing that use POP3 and a POP3 component (not all mail services support IMAP).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900