I'm trying to integrate SendGrid with Nextjs as mentioned in this post, everything works fine locally. I can send mails using SendGrid with status code 202. But when I deploy it to vercel it blocks IP from vercel and thus I get "Unauthorized" as a response from SendGrid I verified it from vercel. Here is the Screenshot from the SendGrid IP access management section.
All these blocked Ip logs are of my production deployment from vercel when I try to send an email through the production version of my app. Now there's an option to whitelist an IP or IP range in SendGrid but the Ip address of vercel's deployment is not static and thus I can't whitelist a single IP address, is there any way I can whitelist all IP addresses in SendGrid? I have also tried to integrate SendGrid API using @sendgrid/mail library but again having the same error.
Any help is appreciated thanks.
