make easy to copy-paste login code
This commit is contained in:
		
							parent
							
								
									ddf461a054
								
							
						
					
					
						commit
						614822730d
					
				
							
								
								
									
										11
									
								
								accounts.js
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								accounts.js
									
									
									
									
									
								
							@ -172,14 +172,17 @@ function create(app) {
 | 
				
			|||||||
    }).then(function (code) {
 | 
					    }).then(function (code) {
 | 
				
			||||||
      var emailParams = {
 | 
					      var emailParams = {
 | 
				
			||||||
        to:      params.username,
 | 
					        to:      params.username,
 | 
				
			||||||
        from:    'login@daplie.com',   // opts.mailer.defaults.system
 | 
					        from:    'login@daplie.com',
 | 
				
			||||||
        replyTo: 'hello@daplie.com',
 | 
					        replyTo: 'hello@daplie.com',
 | 
				
			||||||
        subject: "Use " + code.code + " as your Login Code",  // message.Subject
 | 
					        subject: "Use " + code.code + " as your Login Code",
 | 
				
			||||||
        text:    code.code + " is your Login Code."        // message['stripped-html']
 | 
					        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;
 | 
					      emailParams['h:Reply-To'] = emailParams.replyTo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      return req.getSiteMailer().sendMailAsync(emailParams).then(function () {
 | 
					      return req.getSiteCapability('email@daplie.com').sendMailAsync(emailParams).then(function () {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
          code_id: code.id,
 | 
					          code_id: code.id,
 | 
				
			||||||
          expires: code.expires,
 | 
					          expires: code.expires,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user