Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntactically invalid HELO argument(s) #351

Closed
szkodnik25 opened this issue Jun 8, 2016 · 5 comments
Closed

Syntactically invalid HELO argument(s) #351

szkodnik25 opened this issue Jun 8, 2016 · 5 comments
Labels
bug Something isn't working

Comments

@szkodnik25
Copy link

Hello,
I'm developing app for Android and WP 8.1 which will be sending emails in background. For Android I used JavaMail API and it worked. For WP i wanted to use MailKit, but with the same credentials I used in Android (on port 587) i get the following exception during client.Connect(...):

MailKit.Net.Smtp.SmtpCommandException: Syntactically invalid HELO argument(s)
at MailKit.Net.Smtp.SmtpClient.Ehlo(CancellationToken cancellationToken)
at MailKit.Net.Smtp.SmtpClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken)

What can cause this exception?
Best regards,
Matthew

@jstedfast
Copy link
Owner

I don't know, you'll have to attach a protocol log (see the FAQ for how to get one).

In the worst case, you can set the LocalDomain property of the SmtpClient to override the argument sent in the HELO command.

Most likely either the server is broken (e.g. it's not accepting an IP address like it's supposed to) or else a DNS lookup of your machine's IP address is giving back some bogus illegal string that the SMTP server won't accept.

@szkodnik25
Copy link
Author

Thank you for your answer.

Here is protocol log:

Connected to smtp://smtp.da16.domeny.com:587/?starttls=always
S: 220 db16.domeny.com ESMTP Wed, 08 Jun 2016 13:29:52 +0200
C: EHLO [Windows.Networking.Connectivity.IPInformation]
S: 501 Syntactically invalid EHLO argument(s)
C: HELO [Windows.Networking.Connectivity.IPInformation]
S: 501 Syntactically invalid HELO argument(s)

jstedfast added a commit that referenced this issue Jun 8, 2016
@jstedfast
Copy link
Owner

This should be fixed now if you clone the source code from github

@jstedfast jstedfast added the bug Something isn't working label Jun 8, 2016
@jstedfast
Copy link
Owner

I have published a new version of MailKit that fixes this issue to nuget.

@szkodnik25
Copy link
Author

Thanks, I will take a look soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants