Requiring email verification is a common practice among many websites. It usually involves the website asking the user to enter their email address and then clicking on a link that is sent to their email address. This link can be clicked or opened in the browser, and it will take them to a page that confirms that they are who they say they are.
This process ensures that only real people with a valid email address can sign up for an account on the site. It also prevents people from using fake accounts or using someone else’s account without permission.
🕑 Chapters
- Project Review
- Tracking User Email Verification
- Verify Email Token Methods
- VerifyEmailController.index
- VerifyEmail Mailer
- Generate Verify Email Token
- Send Verify Email User Method
- VerifyEmailController.verify
- Testing Verify Email Send & Functionality
- Resend Verify Email On Invalid Token
- Restricting App Access For Unverified Users
- Outro
Join The Discussion! (5 Comments)
Please sign in or sign up for free to join in on the dicussion.
mohammadali
Hi, I want to send email from an email like this [email protected] , So when i call the send mail api if i provide an email like this [email protected] i receive the email in my inbox, but if provide a gmail email account, I do not receive the email not in inbox or in spam, actually i do not face to kind of error while providing gmail account.
Please sign in or sign up for free to reply
tomgobich
Hi Mohammad! If I'm following you correctly, you're looking to have emails sent to
[email protected]
also be received at[email protected]
, is that correct?If so, this is something you'd need to configure within your email registrar, if they support it. For example, within Zoho Mail, you would set up
[email protected]
as a group email, then add any/all[email protected]
emails you want to receive the group's emails.Please sign in or sign up for free to reply
mohammadali
Hi sir Thanks for answer.
this is the configuration of mail.ts in my project.
const mailConfig = defineConfig({ default: 'smtp', mailers: { smtp: transports.smtp({ host: env.get('SMTP_HOST'), port: env.get('SMTP_PORT'), secure:false, auth: { type: 'login', user: env.get('SMTP_USERNAME'), pass: env.get('SMTP_PASSWORD'), }, }), }, })
Please sign in or sign up for free to reply
mohammadali
When i call sendMail route or api i want to send the user password to the provided user email. for instance when i register myself with my gmail account i don't receive my password, But when i register myself with an email like this [email protected] i receive my password.
So my question is this that why don't receive my password in my gmail inbox or spam.
Please sign in or sign up for free to reply
tomgobich
If it's sending to one inbox but not another, it's likely not a code issue but rather something invalid with how your email provider is set up. You could use a test service, like MailTrap, to verify locally that everything is okay with your code.
Once you verify that, you should be able to log in to your account with your email provider and check the logs to get more details on why it failed to send. It could be a DNS issue or even a requirements issue. For example, Yahoo and Google, have DMARC requirements.
Also, I'm not sure what your reasons are so just as a heads-up, sending user passwords via email isn't very secure as emails can be intercepted, and should their email become compromised, that password is also compromised.
Please sign in or sign up for free to reply