Closed Schotsl closed 2 years ago
I think this is not as SMTP is specified. But I think it is ok to be "nice" and don't error.
https://github.com/EC-Nordbund/denomailer/blob/master/smtp.ts#L375-L382
Do we need to change Lines 376, 379 and 382 or only some of them?
Would be nice if you could create a PR and replace WHERE NEEDED! the this.assert...
line with:
const { code, args } = (await this.readCmd())!
// Some SMTP-Server responde with a 250. We will accept that.
if(code !== 334 && code !== 250) {
throw new Error(code + ': ' + args)
}
Ahaha, I ended up switching to Mailgun! Altough I've still created a PR to fix my previous issue and tested it (#10), I think it should be good for a merge? :)
I closed this for now but add a comment to the readme. I'm not sure if I want to allow non speced behavior if we don't realy need it...
If someone needs that change I will merge it but not for now...
Describe the bug When I try to connect to my mail server I get this error:
To Reproduce I've valid my credentials with the MacOS mail client and everything works fine, If anyone needs credentials to test you can contact me at sjorsvanholst@gmail.com
Expected behavior I expected denomailer to connect, and not crash ;)
Logs
Additional context I've cloned the repo and the crash happens at these lines:
If I replace every code (so
CommandCode.BEGIN_DATA
, 334 ORCommandCode.AUTHO_SUCCESS) with 250 (or
CommandCODE.OK) it works just fine (I've checked, they are actually send).So I think my mail server provider is just lazy and returns OK for every success? This issue could be solved by check for 334 OR 250 etc.. I didn't make a pull request since I know almost nothing about mail protocols and I might be wrong?