Instead of getting https://www.site.com/verify-token/wbdbe87323892d9J_swGDgde25gag6, I am getting https://www.site.com.com/verify-token/…notice the double ‘.com’. This is causing issues with my app’s email verification. Here is the email template:
Accounts.emailTemplates.siteName = "Site.com";
Accounts.emailTemplates.from = "Site Verify <notification-noreply@site.com>";
smtp = {
username: 'notification-noreply@site.com', // eg: server@gmail.com
password: '**************', // eg: 3eeP1gtizk5eziohfervU
server: 'smtp.zoho.com', // eg: mail.gandi.net
port: 465
}
process.env.MAIL_URL = 'smtp://' + encodeURIComponent(smtp.username) + ':' + encodeURIComponent(smtp.password) + '@' + encodeURIComponent(smtp.server) + ':' + smtp.port;
Accounts.emailTemplates.verifyEmail = {
subject() {
return "[Site.com] Verify Your Email Address";
},
text(user, url) {
let emailAddress = user.emails[0].address,
urlWithoutHash = url.replace('#/', ''),
supportEmail = "support@site.com",
emailBody = `To verify your email address (${emailAddress}) visit 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;
}
};
Please someone help. Thanks