Skip to content
Discussion options

You must be logged in to vote

Wait, so, you go to SendGrid, and you say, when an email is received, you can use this URL, and this URL is /api/sendgrid, right?

Have you deployed this? is the latest version of your application, containing this change deployed?

One thing you have to fix is:

// Delete this config - as it is written- it doesn't work in App Router
export const config = {
  api: {
    bodyParser: false,
  },
};

Change this:

    // Parse the multipart/form-data from SendGrid
    const fields = await parseForm(req);

    // Destructure email fields from the request
    const { from, to, subject, text, html } = fields;

to:

    const formData = await req.formData();
    const from = formData.get("from");
    //…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@icyJoseph
Comment options

@Elindo586
Comment options

@icyJoseph
Comment options

@Elindo586
Comment options

@icyJoseph
Comment options

Answer selected by Elindo586
Comment options

You must be logged in to vote
1 reply
@Elindo586
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants