W
Wasp6mo ago
haarismian

Sendgrid is not sending sign up emails

I have set up sendgrid in my app. The sender authentication and domain authentication is verified. Both the email fields in main.wasp are populated correctly under auth and email sender. However when I am testing creating a new account locally, I get a 200 from the app terminal for POST /auth/email/signup 200 but I do not see any api request in sendgrid, and the sign up account doesnt get an email.
8 Replies
kapa.ai
kapa.ai6mo ago
Hi @haarismian. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- There could be a few reasons why you're not seeing the API request in SendGrid or receiving the signup email. Here are a few things you can check: 1. Check your SendGrid API Key: Make sure you have correctly added your SendGrid API key to your .env.server file as described in the Wasp documentation (https://wasp-lang.dev/docs/advanced/email#using-the-sendgrid-provider). The key should be added like this:
SENDGRID_API_KEY=your_sendgrid_api_key
SENDGRID_API_KEY=your_sendgrid_api_key
2. Check your Email Provider Setup: Ensure that you have set the email provider to SendGrid in your main.wasp file. The setup should look like this:
app Example {
...
emailSender: {
provider: SendGrid,
}
}
app Example {
...
emailSender: {
provider: SendGrid,
}
}
3. Check your Localhost Setup: As mentioned in the Discord support thread (https://discord.com/channels/686873244791210014/1215756032064880711), SendGrid might not accept API calls from your localhost. You can use the Dummy provider in your development environment for testing. Once you switch to using SendGrid, you might need to provide it with a URL/domain because it needs to send emails from some domain. 4. Check your Signup Action: Ensure that your custom signup action is correctly set up. The function should be imported from your signup.js file as shown in the Wasp documentation (https://wasp-lang.dev/docs/auth/email#creating-a-custom-sign-up-action). If you've checked all these and you're still having issues, it might be a good idea to reach out to SendGrid support or the Wasp community for further assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @haarismian, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Filip
Filip6mo ago
Hey @haarismian, let's see if we can figure this out! Are you using OpenSaas?
cybereos
cybereos6mo ago
Got the same issue here using open SaaS Deployed app says success check email Sendgrid no activity
neogeofun
neogeofun6mo ago
Well, I never deployed anywhere, I just needed to do a migration on local and created a new user after that, and on local too it won't send verification the link to terminal even though it shows success message.
MEE6
MEE66mo ago
Wohooo @neogeofun, you just became a Waspeteer level 4!
neogeofun
neogeofun6mo ago
NVM; interestingly it created a new user without me having to click any link on terminal. I am guessing these two issues are related.
miho
miho6mo ago
Could you maybe share your relevant sections of the main.wasp and .env.server (of course replace your secret key with XXXX)?
martinsos
martinsos6mo ago
@cybereos @haarismian can you please check your terminal / CLI, where you are running wasp start? Are you getting an email printed there instead?
Want results from more Discord servers?
Add your server