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

Empty email body when sending from NextJS 13 server action #475

Open
asutula opened this issue Jul 19, 2023 · 1 comment
Open

Empty email body when sending from NextJS 13 server action #475

asutula opened this issue Jul 19, 2023 · 1 comment

Comments

@asutula
Copy link

asutula commented Jul 19, 2023

Describe the bug
I migrated my NextJS app to use NextJS 13 app router and server actions. A client component calls a server action that results in the sending of an email. In development mode, the intercepted preview shows a blank white screen. A production build deployed to Vercel results in the email being delivered with no content.

I verified my email component does work fine by forcing the send to happen from an API route in the old pages directory, all other things equal. This works as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Create a NextJS server action that sends an email
  2. Call the server action from a component
  3. See the intercepted preview is just a white screen

Expected behavior
I'd expect to see an accurate email preview and the same email body delivered to the recipient.

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2023-07-18 at 9 36 21 PM

Desktop (please complete the following information):

  • OS: MacOS 13.3.1
  • Browser Arc (Chromium)
  • Version 0.112.0 (40064)
  • Node v18.12.1
@asutula
Copy link
Author

asutula commented Jul 19, 2023

App router code is being bundled with webpack, this includes server action code. I'm not sure if this is new with the app router, but maybe the problem has something to do with webpack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant