Auth and Email Sending Issues

I'm using Wasp's built-in auth system, but when my user signs up using email and password, sometimes they cannot receive a verification email and therefore cannot signup. - I'm using Mailgun as the email provider - In most cases, they are using outlook and I've already seen many complains about the email deliverability when sending to outlook addresses since outlook rejects many emails (not even showing them in spam) if you are using a new domain. Therefore, I'm wondering: 1. What do you guys use for sending transactional emails? Does it has issues when sending to outlook addresses? 2. An alternative is Don't verify email address when sign up. As far as I know many web apps are already doing this to increase their sign-up conversion (although there're some security issues). Is that possible using custom sign-up actions? (I don't want to use the username-and-password sign-up)https://wasp.sh/docs/auth/advanced/custom-auth-actions
Custom sign-up actions | Wasp
If you need to deeply hook into the sign-up process, you can create your own sign-up action and customize the code to, for example, add extra validation, store more data, or otherwise call custom code at registration time.
4 Replies
kapa.ai
kapa.ai3mo ago
Hi @William Jin. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- 1. Transactional Email Providers & Outlook Deliverability Wasp supports several transactional email providers out of the box: Mailgun, SendGrid, SMTP, and a Dummy provider for development. The documentation does not provide any recommendations or comparisons regarding deliverability to Outlook addresses, nor does it mention specific issues with any provider and Outlook. Deliverability issues (such as Outlook rejecting emails from new domains) are a common challenge across all providers, but the Wasp docs do not address this directly. You may want to consult your email provider’s documentation or support for best practices on improving deliverability to Outlook and other strict email services. Wasp itself does not influence deliverability beyond passing your configuration to the provider you choose Sending Emails. 2. Skipping Email Verification on Signup Yes, it is possible to skip email verification in development by setting the SKIP_EMAIL_VERIFICATION_IN_DEV=true environment variable in your .env.server file. This will allow users to sign up and log in without verifying their email, but only in development mode. In production, Wasp requires email verification by default for email/password auth Email Verification Flow. If you want to skip email verification entirely (even in production), you would need to implement a custom sign-up action. The custom sign-up action gives you full control over the signup process, so you can choose not to send a verification email or set the user as verified immediately. The docs provide an example of a custom signup action where you could simply omit the email verification step and set isEmailVerified: true when creating the user Custom Signup Action, Creating a Custom Sign-up Action. Example (simplified):
// In your custom signup action
const newUserProviderData = await sanitizeAndSerializeProviderData({
hashedPassword: args.password,
isEmailVerified: true, // Mark as verified immediately
emailVerificationSentAt: null,
passwordResetSentAt: null,
});
await createUser(
providerId,
newUserProviderData,
{}, // Additional user data
);
// Do NOT send verification email
// In your custom signup action
const newUserProviderData = await sanitizeAndSerializeProviderData({
hashedPassword: args.password,
isEmailVerified: true, // Mark as verified immediately
emailVerificationSentAt: null,
passwordResetSentAt: null,
});
await createUser(
providerId,
newUserProviderData,
{}, // Additional user data
);
// Do NOT send verification email
This approach allows you to use email/password signup without requiring email verification, even in production. Be aware of the security implications of this choice. Summary:
- Wasp supports Mailgun, SendGrid, and SMTP, but does not provide guidance on deliverability to Outlook. - You can skip email verification in development with an env variable, or in production by customizing the signup action to not require verification.
- You do not need to switch to username-and-password auth to achieve this; custom email/password signup is supported. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @William Jin, 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?
Vinny (@Wasp)
Vinny (@Wasp)3mo ago
Hm that sounds like an issue with MailGun or something @William Jin). We also wrote a blogpost guide about getting your app emails to not land in Spam (if that's what's happening): https://wasp.sh/blog/2024/09/24/why-your-emails-arent-getting-delivered-and-how-to-fix-this-problem
Why Your SaaS Emails Aren’t Being Delivered and How to Fix This I...
If you’ve just built your SaaS web app and deployed it on a production server, you might be running into email deliverability issues. Transactional or marketing emails might not be landing in your users' inboxes. Don’t panic! This is a pretty common problem, especially for apps that run on newly registered domains.
Vinny (@Wasp)
Vinny (@Wasp)3mo ago
Did the bot answer your question though?
William Jin
William JinOP3mo ago
Thanks Vinny, gonna check out the blog! Yes I followed the bot's answers and used custom signup action and it worked :boi:

Did you find this page helpful?