added EMAIL_FROM environment variable (#207)
This commit is contained in:
@@ -36,6 +36,7 @@ EMAIL=false
|
||||
# EMAIL_PORT="-> FILL IN <-"
|
||||
# EMAIL_USERNAME="-> FILL IN <-"
|
||||
# EMAIL_PASSWORD="-> FILL IN <-"
|
||||
# EMAIL_FROM="-> FILL IN <-"
|
||||
|
||||
############################################################
|
||||
# Auth strategies
|
||||
|
||||
@@ -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 )
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user