Email Verification SMTP not working
I tried MailGun API /SMTP and tried Brevo SMTP , when i try to send email using swaks command it works , but on the app it does not work ( not in dev nor production ).
when i try to signup i get status 200 but no email sent.

7 Replies
Hi @Dada. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I understand you're having issues with email verification not working in your Wasp application. Let's troubleshoot this issue based on the information provided.
Possible Causes and Solutions
1. Email Provider Configuration
Make sure you've properly configured your email provider in your
main.wasp
file:
2. Environment Variables
For SMTP, ensure you've set all required environment variables in your .env.server
file:
For Mailgun, you need:
Learn more about SMTP configuration
Learn more about Mailgun configuration
3. Email Verification Setup
Check that you've properly set up email verification in your auth configuration:
4. Debug with Dummy Provider
For debugging purposes, try switching to the Dummy provider temporarily to see if emails are being attempted:
This will log emails to the console instead of sending them, which can help identify if the issue is with your email configuration or with the email sending process itself. Note that the Dummy provider is for development only and won't work in production.
Learn more about the Dummy provider
5. Check Email Sending Code
If you're using a custom sign-up action, ensure your email sending code is correct:
Since you're getting a 200 status but no email, check your server logs for any error messages related to email sending. The issue might be with the email provider's configuration or with the email content itself.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Dada, 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?having the same issue here, all works locally but when deploying I get 200 and no email. When checking the backend logs I see:
I deployed via CapRover following the tutorial. I tried to map/open the ports used for SMTP 465 and 587 but no luck. Do you have any suggestion?
Wohooo @brahyammm, you just became a Waspeteer level 1!
solved, I was using port 465 in env vars but read that is usually blocked by VPS providers. luckily my email provider allows 2587 too which is not so opening that one worked.
Hello @Dada , do you have any MailGun, Brevo dashboards that show how many sucessful/failed emails you've sent? Trying to see if it's caused by wasp code or some configuration errors.
Also, did you try to check the steps from kapa.ai?
@franjo i figured out the problem i had , in the main.wasp file , there are two places where you set the fromField .
i was only setting it in emailSender object , while the field inisde auth.methods.email.fromField.email was still set to example domain , thats why it wasn't working .
Glad you got it working. 😁 👍