verification emails not sent

when a user signs up, the verification email isn't sent. however, if they request a password reset, that email is sent. so email in general is working, but the verification email isn't. as you can see in the logs, there are no errors. any ideas?
No description
3 Replies
kapa.ai
kapa.ai3w ago
Hi @johnwest6192. 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 several reasons why verification emails aren't being sent while password reset emails are working. Let me help you troubleshoot this issue: 1. Check your email provider configuration: Make sure you've properly set up an email sender in your main.wasp file. You should have something like:
app myApp {
// ...
emailSender: {
provider: SendGrid, // or another provider like SMTP, Mailgun, etc.
}
}
app myApp {
// ...
emailSender: {
provider: SendGrid, // or another provider like SMTP, Mailgun, etc.
}
}
2. Verify environment variables: Ensure all required environment variables for your email provider are correctly set in your .env.server file. For example, if using SendGrid, you need SENDGRID_API_KEY Using the SendGrid Provider. 3. Email verification configuration: Check that you've properly configured email verification in your auth settings:
auth: {
userEntity: User,
methods: {
email: {
fromField: {
name: "My App",
},
emailVerification: {
clientRoute: EmailVerificationRoute,
},
// ...
}
}
}
auth: {
userEntity: User,
methods: {
email: {
fromField: {
name: "My App",
},
emailVerification: {
clientRoute: EmailVerificationRoute,
},
// ...
}
}
}
4. Development environment shortcut: If you're in development mode, check if you've set SKIP_EMAIL_VERIFICATION_IN_DEV=true in your .env.server file. This would skip sending verification emails Email Verification Flow. 5. Custom sign-up action: If you've implemented a custom sign-up action, make sure you're correctly calling createEmailVerificationLink and sendEmailVerificationEmail functions Creating a Custom Sign-up Action. 6. Check email templates: If you've customized the email verification template, ensure it's properly configured. 7. Check console logs: Even though you mentioned there are no errors in the logs, double-check for any warnings or info messages related to email verification. Since password reset emails are working, your basic email configuration seems correct. The issue is likely specific to the email verification flow. If none of the above solutions work, you might want to share more details about your configuration for more specific help. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @johnwest6192, 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?
johnwest6192
johnwest6192OP3w ago
none of these suggestions helped, and i'm unsure where else to look. so on a whim i added SKIP_EMAIL_VERIFICATION_IN_DEV=false and then got a verification email. so maybe somehow fly was defaulting that to true. anyway, seems to be working now.
miho
miho3w ago
Woah, that shouldn't be possible in production. Did you have the value set to true before? Let me test this with SKIP_EMAIL_VERIFICATION_IN_DEV=true and see if I can reproduce it I have tried it out myself and I receive a verification email. This env var is not used in the production build. Did you maybe run your app with wasp start in production?

Did you find this page helpful?