I'm trying to connect to a Rackspace IMAP server using the following code.
using (var client = new ImapClient(new ProtocolLogger(logfile)))
{
client.Connect(account.Server, 587, SecureSocketOptions.StartTls);
client.Authenticate(account.Username, `account.Password);
I get an error:
Syntax error in IMAP server greeting. Unexpected token: [atom: 220]
The log file reads:
_Connected to imap://fakemailserver.com:587/?starttls=always
S: 220 fakemailserver.com ESMTP - VA Code Section 18.2-152.3:1 forbids use of this system for unsolicited bulk electronic mail (Spam)_
Note: I currently connect to this server successfully with MailSystem.NET library. I'm trying to switch over.
How do I resolve this?
You are trying to use the ImapClient to connect to an SMTP port.
Either use an SmtpClient or connect to an IMAP port (143 or 993).
Thank you.
As a side note, the consistent responses from you seen on different forums, plus the detailed errors and documentation
provided makes this library a pleasure to work with.
Thanks.
Most helpful comment
Thank you.
As a side note, the consistent responses from you seen on different forums, plus the detailed errors and documentation
provided makes this library a pleasure to work with.
Thanks.