From dc2255dbe77399138f3467b17d2760209f6b5c25 Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Mon, 13 Nov 2017 15:53:38 +0200 Subject: [PATCH] update --- lib/maildrop.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/maildrop.js b/lib/maildrop.js index 2dcb2881..3d8f2511 100644 --- a/lib/maildrop.js +++ b/lib/maildrop.js @@ -167,19 +167,23 @@ module.exports = (options, callback) => { }); break; case 'relay': - deliveries.push({ - to: options.to, - mx: target.value.mx, - mxPort: target.value.mxPort, - mxAuth: target.value.mxAuth, - mxSecure: target.value.mxSecure + (Array.isArray(options.to) ? options.to : [].concat(options.to || [])).forEach(to => { + deliveries.push({ + to, + mx: target.value.mx, + mxPort: target.value.mxPort, + mxAuth: target.value.mxAuth, + mxSecure: target.value.mxSecure + }); }); break; case 'http': - deliveries.push({ - to: options.to, - http: true, - targetUrl: target.value + (Array.isArray(options.to) ? options.to : [].concat(options.to || [])).forEach(to => { + deliveries.push({ + to, + http: true, + targetUrl: target.value + }); }); break; }