added EMAIL_FROM environment variable (#207)

This commit is contained in:
Cristian Balas
2021-05-03 13:13:02 +03:00
committed by GitHub
parent 6e93cff174
commit 164fb01d50
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -36,6 +36,7 @@ EMAIL=false
# EMAIL_PORT="-> FILL IN <-"
# EMAIL_USERNAME="-> FILL IN <-"
# EMAIL_PASSWORD="-> FILL IN <-"
# EMAIL_FROM="-> FILL IN <-"
############################################################
# Auth strategies
+3 -2
View File
@@ -57,8 +57,9 @@ exports.sendEmail = async( { from, to, subject, text, html } ) => {
}
try {
let email_from = process.env.EMAIL_FROM || 'no-reply@speckle.systems'
let info = await transporter.sendMail( {
from: from || '"Speckle" <no-reply@speckle.systems>',
from: from || `"Speckle" <${email_from}>`,
to,
subject,
text,
@@ -68,6 +69,6 @@ exports.sendEmail = async( { from, to, subject, text, html } ) => {
debug( 'speckle:test' )( nodemailer.getTestMessageUrl( info ) )
}
} catch ( e ) {
debug( 'speckle:errors' )( e )
}
}