Make mailer.js work in test mode

This commit is contained in:
Girish Ramakrishnan
2017-04-12 15:35:52 -07:00
parent abb371d81e
commit 1029402d1e

View File

@@ -95,6 +95,8 @@ function mailConfig() {
// keep this in sync with the cloudron.js dns changes
function checkDns() {
if (process.env.BOX_ENV === 'test') return;
subdomains.waitForDns(config.fqdn(), new RegExp('^v=spf1 .*a:' + config.adminFqdn().replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + '.*'), 'TXT', { interval: 60000, times: Infinity }, function (error) {
if (error) return debug(error); // can never happen