diff --git a/src/mail.js b/src/mail.js index 3cb45efba..eed41ab99 100644 --- a/src/mail.js +++ b/src/mail.js @@ -809,7 +809,7 @@ function setMailEnabled(domain, enabled, callback) { function sendTestMail(domain, to, callback) { assert.strictEqual(typeof domain, 'string'); - assert.strictEqual(typeof to, 'object'); + assert.strictEqual(typeof to, 'string'); assert.strictEqual(typeof callback, 'function'); get(domain, function (error, result) { diff --git a/src/mailer.js b/src/mailer.js index c4c8ccdcd..ee58ce339 100644 --- a/src/mailer.js +++ b/src/mailer.js @@ -84,7 +84,7 @@ function getMailConfig(callback) { adminEmails: adminEmails, cloudronName: cloudronName, notificationDomain: defaultDomain.domain, - notificationFrom: '"' + cloudronName + '" ' + notificationFrom: `"${cloudronName}" ` }); }); }); @@ -540,7 +540,7 @@ function sendTestMail(domain, email) { if (error) return debug('Error getting mail details:', error); var mailOptions = { - from: `no-reply@${domain}`, + from: `"${mailConfig.cloudronName}" `, to: email, subject: util.format('Test Email from %s', mailConfig.cloudronName), text: render('test.ejs', { cloudronName: mailConfig.cloudronName, format: 'text'})