I was just figuring this out last week for my app. You need to configure accounts:
Accounts.config({sendVerificationEmail: true, forbidClientAccountCreation: false});
Accounts.emailTemplates.siteName = "YourAppName";
Accounts.emailTemplates.from = "YourAppName <support@YourAppName.com>";
Accounts.emailTemplates.verifyEmail = {
subject() {
return "[YourAppName] Verify Your Email Address";
},
text( user, url ) {
let emailAddress = user.emails[0].address,
urlWithoutHash = url.replace( '#/', '' ),
supportEmail = "support@YourAppName.com",
emailBody = `To verify your email address (${emailAddress}) click the following link:\n\n${urlWithoutHash}\n\n If you did not request this verification, please ignore this email. If you feel something is wrong, please contact our support team: ${supportEmail}.`;
return emailBody;
}
};
I have that in my server startup code. Note the urlWithoutHash
code β this replaces the hash sign in the URL, which is essential. I am using Meteor accounts, but not accounts-ui β Iβve built my own accounts user interface using Material-UI.