dpwright / HaskellNet-SSL

Helpers to connect to SSL/TLS mail servers with HaskellNet
BSD 3-Clause "New" or "Revised" License
21 stars 30 forks source link

503 error when using SMTP.doSMTPSTARTTLS #20

Closed benstevens48 closed 4 years ago

benstevens48 commented 7 years ago

Hi, I've successfully used this package to send emails using doSMTPSSL server. However, when I try to use doSMTPSTARTTLS server, it fails straight away (before authenticating) with the error cannot connect to server: 503 Bad sequence of commands. For info: I'm trying to connect to a 1&1 smtp server: auth.smtp.1and1.co.uk, and this definitely works with STARTTLS on port 587 because that's how I have my email client set up. I also tried a different server, smtp.hermes.cam.ac.uk, and that failed with a slightly different error message (but probably the same problem): cannot connect to server: 503 STARTTLS command used when not advertised. I read somewhere that you might need to send an extra EHLO command or something. Would be good if this could be fixed or you could suggest a workaround. Thanks.

StevenXL commented 5 years ago

Has this been fixed? I'm trying to follow the example to connection to Gmail via doSMTPSTARTTLS but I can never authenticate. I do have 2FA on on my account, but I created an App Password and still cannot authenticate.

Niboor commented 5 years ago

This has been fixed in my fork (https://github.com/Niboor/HaskellNet-SSL). The changes have not been merged yet to this repository.

Hazelfire commented 4 years ago

Fix has been merged in #21