make easy to copy-paste login code

This commit is contained in:
aj 2017-09-06 21:31:01 +00:00
parent ddf461a054
commit 614822730d
1 changed files with 7 additions and 4 deletions

View File

@ -172,14 +172,17 @@ function create(app) {
}).then(function (code) {
var emailParams = {
to: params.username,
from: 'login@daplie.com', // opts.mailer.defaults.system
from: 'login@daplie.com',
replyTo: 'hello@daplie.com',
subject: "Use " + code.code + " as your Login Code", // message.Subject
text: code.code + " is your Login Code." // message['stripped-html']
subject: "Use " + code.code + " as your Login Code",
text: "Your login code is:\n\n"
+ code.code
+ "\n\nThis email address was used to request to add your Hello ID to a device."
+ "\nIf you did not make the request you can safely ignore this message."
};
emailParams['h:Reply-To'] = emailParams.replyTo;
return req.getSiteMailer().sendMailAsync(emailParams).then(function () {
return req.getSiteCapability('email@daplie.com').sendMailAsync(emailParams).then(function () {
return {
code_id: code.id,
expires: code.expires,