Skip to content

Getting InvalidContentType on send #74

@sirlan-ff00ff

Description

@sirlan-ff00ff

Describe the bug

When trying to send an email, it doesn't work with a Uncaught InvalidData: received corrupt message of type InvalidContentType

To Reproduce

import { SMTPClient } from "https://deno.land/x/denomailer/mod.ts";

const client = new SMTPClient({
  debug: { log: true },
  connection: {
    hostname: "smtp-relay.brevo.com",
    port: 587,
    tls: true,
    auth: {
      username: "username",
      password: "password",
    },
  },
});

await client.send({
  from: "[email protected]",
  to: "[email protected]",
  subject: "example",
  content: "Oh, hello there",
  html: "<p>Oh, hello there</p>",
});

await client.close();

Expected behavior

Be able to send the email without errors

Logs

Provide the output of deno --version

deno 1.35.3 (release, x86_64-unknown-linux-gnu)
v8 11.6.189.12
typescript 5.1.6

Provide the output of your code snippet (with debug.log set to true see
hhttps://github.com/EC-Nordbund/denomailer#options )

used resolved config
.debug
┌───────────────┬────────┐
│ (idx)         │ Values │
├───────────────┼────────┤
│ log           │ true   │
│ allowUnsecure │ false  │
│ encodeLB      │ false  │
│ noStartTLS    │ false  │
└───────────────┴────────┘
.connection
┌──────────┬──────────────────────────────────────────────────────────────────────────┐
│ (idx)    │ Values                                                                   │
├──────────┼──────────────────────────────────────────────────────────────────────────┤
│ hostname │ "smtp-relay.brevo.com"                                                   │
│ port     │ 587                                                                      │
│ tls      │ true                                                                     │
│ auth     │ '{"username":"username","password":"password"}' │
└──────────┴──────────────────────────────────────────────────────────────────────────┘
.pool
undefined
error: Uncaught InvalidData: received corrupt message of type InvalidContentType
    at async Object.pull (ext:deno_web/06_streams.js:799:27)

Tried using it for both Oracle Cloud Email Delivery and Brevo transactional emails

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions