Skip to content

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

Description

@asutula

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions