Skip to content

Conversation

@ilkergonenc
Copy link
Collaborator

Sending a custom verification mail on new sign up.
Verify mail on a custom route/page and checks if it's already verified.

@eminx eminx temporarily deployed to cocoso-verify-email-7bbtso5ue8 July 1, 2022 11:41 Inactive
Meteor.call('sendVerificationLink', accountVerification);
// console.log(accountVerification);

Meteor.call('sendWelcomeEmail', userId);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only send the welcome email once user clicks and activates the account...

return `Hi, To verify your account email, simply click the link below. ${newUrl}`;
},
};
});
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to somehow handle the i18n in this, since we have swedish users who would want in swedish...

emails:
verifyEmail:
subject: Please verify your email address
body: Hi, To verify your account email, simply click the link below
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swedish content?

try {
const userId = Accounts.createUser(values);
if (userId) {
const accountVerification = Accounts.sendVerificationEmail(userId);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing the email to be sent already once. And then in the following method sendVerificationLink, there's another email coming. So there are two emails that arrive...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants