Closed nrallakis closed 1 year ago
Please use TLS or downgrade to 1.4.0 for now (see also #59)
(and if your username for the email is "contact@coolcar.gr" and your password starts with "Ky" please change it as you exposed it in your issue)
Oops you're right, I will change that! Thank you very much. It works fine after downgrading. I didn't have the option for TLS, so downgrading was the only option. Should have asked a little earlier :P
I just found a fix for that. Released in Version 1.6.0!
I tried the new version and it still doesn't work. But with another error. Here is the log:
Listening on http://localhost:8000/
used resolved config
.debug
┌───────────────┬────────┐
│ (idx) │ Values │
├───────────────┼────────┤
│ log │ true │
│ allowUnsecure │ false │
│ encodeLB │ false │
│ noStartTLS │ false │
└───────────────┴────────┘
.connection
┌──────────┬─────────────────────────────────────────────────────────────┐
│ (idx) │ Values │
├──────────┼─────────────────────────────────────────────────────────────┤
│ hostname │ "smtp.office365.com" │
│ port │ 587 │
│ tls │ false │
│ auth │ '{"username":"********","password":"********"}' │
└──────────┴─────────────────────────────────────────────────────────────┘
.pool
undefined
220 VE1PR08CA0001.outlook.office365.com Microsoft ESMTP MAIL Service ready at Sun, 12 Feb 2023 21:49:14 +0000
┌───────┬──────────────────────┐
│ (idx) │ Values │
├───────┼──────────────────────┤
│ 0 │ "EHLO" │
│ 1 │ "smtp.office365.com" │
└───────┴──────────────────────┘
250-VE1PR08CA0001.outlook.office365.com Hello [85.73.133.162]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
┌───────┬────────────┐
│ (idx) │ Values │
├───────┼────────────┤
│ 0 │ "STARTTLS" │
└───────┴────────────┘
BadResource: Bad resource ID
at async Object.startTls (deno:ext/net/02_tls.js:89:42)
at async SMTPClient.#prepareConnection (https://deno.land/x/denomailer@1.6.0/client/basic/client.ts:339:20)
at async https://deno.land/x/denomailer@1.6.0/client/basic/client.ts:38:7
at async SMTPClient.send (https://deno.land/x/denomailer@1.6.0/client/basic/client.ts:57:5)
at async sendEmail (file:///home/deno/functions/_shared/send_email.ts:20:5)
at async Server.<anonymous> (file:///home/deno/functions/contact-email/index.ts:14:5)
at async Server.#respond (https://deno.land/std@0.177.0/http/server.ts:299:18)
error: Uncaught (in promise) Error: invalid cmd
throw new Error(`invalid cmd`);
^
at SMTPConnection.assertCode (https://deno.land/x/denomailer@1.6.0/client/basic/connection.ts:76:13)
at SMTPConnection.writeCmdAndAssert (https://deno.land/x/denomailer@1.6.0/client/basic/connection.ts:132:10)
Sorry 🙈 Bad testing by me... Creating a new issue for that.
No problem, I will use 1.4.0 till you fix it. Thanks!
Describe the bug
Can't send email using Microsoft SMTP server (smtp.office365.com). The only way I managed to send email was using the old library deno-smtp with the big caveat of not having StartTLS encryption.
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Logs
Provide the output of
deno --version
Provide the output of your code snippet (with
debug.log
set to true see hhttps://github.com/EC-Nordbund/denomailer#options )