422 on force send
See original GitHub issueDescribe the bug I am getting a 422 error in the terminal when I force send.
I am also getting the following error popup:
This is my API route that triggers the sending of the email
//api/sendTestEmail.tsx
import sendMail from "emails";
import ConfirmEmail from "emails/ConfirmEmail";
export default async function handler(req: any, res: any) {
sendMail({
subject: "First Test Email",
to: "personalEmail@hidden.com",
component: <ConfirmEmail firstName="Amelita" ctaText={"Verify this test email"} callbackUrl={"https://callbackUrl.com/"} />
});
}
This is the my emails/index.ts
import nodemailer from "nodemailer";
import { buildSendMail } from "mailing-core";
const transport = nodemailer.createTransport({
pool: true,
host: "smtp.postmarkapp.com",
port: 587,
secure: true, // use TLS
auth: {
user: process.env.POSTMARK_CLIENT,
pass: process.env.POSTMARK_CLIENT,
},
});
const sendMail = buildSendMail({
transport,
defaultFrom: "workEmail@hidden.com",
configPath: "./mailing.config.json",
});
export default sendMail;
Finally, this is the preview output
mailing 💌 opening sendMail preview {
subject: 'First Test Email',
to: 'personalEmail@hidden.com',
component: {
'$$typeof': Symbol(react.element),
type: [Function: ConfirmEmail],
key: null,
ref: null,
props: {
firstName: 'Amelita',
ctaText: 'Verify this test email',
callbackUrl: 'https://callbackUrl.com/'
},
_owner: null,
_store: {}
},
html: 'omitted'
}
API resolved without sending a response for /api/sendTestEmail, this may result in stalled requests.
mailing 💌 opening sendMail preview {
subject: 'First Test Email',
to: 'personalEmail@hidden.com',
component: {
'$$typeof': Symbol(react.element),
type: [Function: ConfirmEmail],
key: null,
ref: null,
props: {
firstName: 'Amelita',
ctaText: 'Verify this test email',
callbackUrl: 'https://callbackUrl.com/'
},
_owner: null,
_store: {}
},
html: 'omitted'
}
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:6
Top Results From Across the Web
How to Fix '422 Unprocessable Entity' when sending a POST ...
I am trying to create a wiki page using redmine rest api. The Authentication was succeeded, however the wiki page is not being...
Read more >422 Unprocessable Entity - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 422 Unprocessable Entity response status code indicates that the server understands the content type ...
Read more >http - Is a 422 response ever appropriate for a GET request?
The HyperText Transfer Protocol (HTTP) 422 Unprocessable Entity response status code indicates that the server understands the content type ...
Read more >Why do I get a Code 422 error when connecting my printer?
To re-register with PrintNode: Open the PrintNode app. The PrintNode Client window appears. User-added image. Navigate to the Accounts tab in ...
Read more >Penal Code 422 PC - Criminal Threats - California Law
Penal Code 422 PC prohibits you from making criminal threats. This means threats of death or great bodily injury that are intended to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also get the 422 issue
fix released in v0.8.16
Thanks @elie222 and @SSardorf for surfacing.
Feel free to re-open and/or ping me in the discord if you’re still having problems.