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

Error sending emails through UI #142

Open
rkcreation opened this issue Nov 27, 2024 · 3 comments
Open

Error sending emails through UI #142

rkcreation opened this issue Nov 27, 2024 · 3 comments
Labels
bug Something isn't working self-hosting Issues related to self-hosting Plunk

Comments

@rkcreation
Copy link

Hi,

I can't send emails with the self-hosted version.

I have a verified domain, but when I try to send test or wampaign through the UI, I've got an error "Could not send your campaign" in UI, and "InvalidParameterValue: Illegal address" in logs. It seems to be related to Reply header but I can't see where set this in my project.

Thanks for your help!

@driaug driaug added bug Something isn't working self-hosting Issues related to self-hosting Plunk labels Nov 27, 2024
@driaug
Copy link
Member

driaug commented Nov 27, 2024

Are you sure your domain is correctly verified in AWS?

Can you send emails through the API or does that result in the same error?

@rkcreation
Copy link
Author

rkcreation commented Nov 27, 2024

When I try with API, Plunk returns an error and stop working.

My script :

fetch('https://MY_DOMAIN/api/v1/send', {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "Authorization": "Bearer MY PROJECT SECRET API KEY"
    },
    body: JSON.stringify({
        "to": "TEST EMAIL",
        "subject": "Hello world!",
        "body": "Your first email with Plunk"
    })
});

The error :

node:internal/deps/undici/undici:11730
    Error.captureStackTrace(err, this);
          ^

TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11730:11) {
  cause: RequestContentLengthMismatchError: Request body length does not match content-length header
      at AsyncWriter.end (node:internal/deps/undici/undici:9128:19)
      at writeIterable (node:internal/deps/undici/undici:9032:16) {
    code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
  }
}

Node.js v18.19.0

@rkcreation
Copy link
Author

Sorry, the real error is the same :

2024-11-27T23:36:48.939029703Z ✖  error     InvalidParameterValue: Illegal address 
2024-11-27T23:36:48.939089524Z     at throwDefaultError (/app/node_modules/@smithy/smithy-client/dist-cjs/index.js:836:20)
2024-11-27T23:36:48.939096793Z     at /app/node_modules/@smithy/smithy-client/dist-cjs/index.js:845:5
2024-11-27T23:36:48.939101797Z     at de_CommandError (/app/node_modules/@aws-sdk/client-ses/dist-cjs/index.js:2760:14)
2024-11-27T23:36:48.939106744Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-11-27T23:36:48.939111613Z     at async /app/node_modules/@smithy/middleware-serde/dist-cjs/index.js:35:20
2024-11-27T23:36:48.939116922Z     at async /app/node_modules/@smithy/core/dist-cjs/index.js:168:18
2024-11-27T23:36:48.939121752Z     at async /app/node_modules/@smithy/middleware-retry/dist-cjs/index.js:320:38
2024-11-27T23:36:48.939126714Z     at async /app/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:34:22
2024-11-27T23:36:48.939131525Z     at async EmailService.send (/app/packages/api/services/EmailService.js:40:26)
2024-11-27T23:36:48.939136415Z     at async V1.send (/app/packages/api/controllers/v1/index.js:167:35)

(the first one is related to #114)

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

No branches or pull requests

2 participants