Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
BUGFIX: Plus signs in emails
  • Loading branch information
hijohnnylin committed Feb 18, 2020
1 parent 1c557cb commit 03958f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utilities/email.js
Expand Up @@ -21,25 +21,27 @@ module.exports = {

// === Main
sendConfirmation: (toAddress, code, browser = false, lockdown = false) => {
let emailEncoded = encodeURIComponent(toAddress)
return send(
`team@${DOMAIN}`,
toAddress,
"Click to Confirm Email",
"confirm-email",
{
confirmemailurl: `https://www.${DOMAIN}/confirm-email?email=${toAddress}&code=${code}&browser=${browser}&lockdown=${lockdown}`
confirmemailurl: `https://www.${DOMAIN}/confirm-email?email=${emailEncoded}&code=${code}&browser=${browser}&lockdown=${lockdown}`
}
);
},

sendChangeEmailConfirmation: (toAddress, code) => {
let emailEncoded = encodeURIComponent(toAddress)
return send(
`team@${DOMAIN}`,
toAddress,
"Click to Confirm Change of Email",
"confirm-change-email",
{
confirmemailurl: `https://www.${DOMAIN}/confirm-change-email?email=${toAddress}&code=${code}`
confirmemailurl: `https://www.${DOMAIN}/confirm-change-email?email=${emailEncoded}&code=${code}`
}
);
},
Expand Down

0 comments on commit 03958f5

Please sign in to comment.