fix(email): allow sender email var for development
Allows setting the SES_ID, SES_SECRET and EMAIL_SENDER values
This commit is contained in:
		
				
					committed by
					
						 Berkeley Martinez
						Berkeley Martinez
					
				
			
			
				
	
			
			
			
						parent
						
							0ce30409c0
						
					
				
				
					commit
					a426ff7ef9
				
			| @@ -597,20 +597,23 @@ module.exports = function(User) { | ||||
|           const mailOptions = { | ||||
|             type: 'email', | ||||
|             to: user.email, | ||||
| <<<<<<< HEAD | ||||
|             from: 'Team@freecodecamp.com', | ||||
|             subject: 'Free Code Camp - Authentication Request!', | ||||
| ======= | ||||
|             from: isDev ? | ||||
|               process.env.EMAIL_SENDER : 'team@freecodecamp.com', | ||||
|             subject: 'freeCodeCamp - Authentication Request!', | ||||
| >>>>>>> fix(email): allow sender email var for development | ||||
|             text: renderAuthEmail({ | ||||
|               loginEmail, | ||||
|               loginToken | ||||
|             }) | ||||
|           }; | ||||
|           if (!isDev) { | ||||
|             this.email.send(mailOptions, err =>{ | ||||
|               if (err) { throw err; } | ||||
|             }); | ||||
|           } else { | ||||
|             console.log('~~~~\n' + mailOptions.text + '~~~~\n'); | ||||
|           } | ||||
|  | ||||
|           this.email.send(mailOptions, err =>{ | ||||
|             if (err) { throw err; } | ||||
|           }); | ||||
|           const emailAuthLinkTTL = token.created; | ||||
|           this.update$({ | ||||
|             emailAuthLinkTTL | ||||
|   | ||||
		Reference in New Issue
	
	Block a user