Reputation: 5761
I have a Next.js (deployed with Vercel) app and I am trying to implement SendGrid to create a contact form on my site. I have followed this tutorial
when trying to submit the form I get the following error:
POST http://localhost:3000/api/send 400 (Bad Request)
I believe the issue is around sender authentication
. (https://app.sendgrid.com/settings/sender_auth)
My domain provider is '123-reg'.
I have added the dns records from Sendergrid to the 123 dns section. However when I click on verify I get the following errors:
I can't seem to verify these records.
UPDATE
I have actually updated my Vercel dashboard domains section with the values provided from SendGrid but I still get the same errors:
Upvotes: 2
Views: 1996
Reputation: 279
if your domain doesn't match 'alex-web.co.uk' then it will not work. Ensure the CNAME has the correct domain. If it matches your domain name Vercel will auto remove the domain name from your CNAME.
Upvotes: 0
Reputation: 128
It seems you are using Vercel (Zeit Now) for your DNS and you haven't configured the SendGrid DNS records that the service requires.
When adding CNAME to the Vercel DNS interface, try adding only the subdomain part. This means em8573
instead of em8573.alex-web.co.uk
and so on.
You can find instructions on how to create CNAME here.
You can easily test your records using Dig web interface, an amazing web service.
Upvotes: 7