Using Sendgrid in test
Sendgrid always requires a url (not localhost) and does not accept API calls from my dev environment. Is there any test feature or workaround?
Thank you very much!
3 Replies
You can use the Dummy provider in dev https://wasp-lang.dev/docs/advanced/email#using-the-dummy-provider
Sending Emails | Wasp
With Wasp's email-sending feature, you can easily integrate email functionality into your web application.
Ok, great feature then I can test at least the app functionality. To make sure real emails are working is then something in production environment
@mindreaderlupoDO so Dummy email provdier is great for getting started, so you don't have to bother with setting up Sendgrid at the beginning when writing a new app -> but once you switch your app to actually using Sendgrid, you don't want to go back to Dummy email provider any more. You will probably want to do that once you come closer to deploying your web app, and know a URL where you will deploy it.
As for calling Sendgrid from localhost -> there should be a way to do that! I haven't used it recently, but some years ago when I did, there was an option by Sendgrid to have this Test api key, which you use during development, I would expect something like that to still exist.
You might still need to provide it with the URL/domain though, because it needs to send emails from some domain.