mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 06:05:53 -05:00
Email improvements.
This commit is contained in:
parent
7bcef8e7dc
commit
b200d48f56
@ -12,7 +12,7 @@
|
||||
Hello [[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>User [[[USERNAME]]] on server <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> is requesting you to install software to start a remote control session.</p>
|
||||
<p>User [[[USERNAME]]] on server <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> is requesting you to install software to start a remote control session.</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
Message: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
To install the software, <a href="[[[SERVERURL]]][[[LINKURL]]]">click here</a> and follow the instructions.
|
||||
To install the software, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">click here</a> and follow the instructions.
|
||||
</p>
|
||||
</area-link>
|
||||
<p>If you did not initiate this request, please ignore this mail.</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
Dobrý den, [[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>Uživatel [[[USERNAME]]] na serveru <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> vás žádá o instalaci softwaru pro spuštění relace dálkového ovládání.</p>
|
||||
<p>Uživatel [[[USERNAME]]] na serveru <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> vás žádá o instalaci softwaru pro spuštění relace dálkového ovládání.</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
Zpráva: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
Chcete-li nainstalovat software, <a href="[[[SERVERURL]]][[[LINKURL]]]">klikněte zde</a> a postupujte podle pokynů.
|
||||
Chcete-li nainstalovat software, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">klikněte zde</a> a postupujte podle pokynů.
|
||||
</p>
|
||||
</area-link>
|
||||
<p>Pokud jste tento požadavek nezačali, ignorujte tento e-mail.</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
Hallo [[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>Benutzer [[[USERNAME]]] auf dem Server <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> fordert Sie auf, Software zu installieren, um eine Fernsteuerungssitzung zu starten.</p>
|
||||
<p>Benutzer [[[USERNAME]]] auf dem Server <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> fordert Sie auf, Software zu installieren, um eine Fernsteuerungssitzung zu starten.</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
Botschaft: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
Um die Software zu installieren, <a href="[[[SERVERURL]]][[[LINKURL]]]">hier klicken</a> und folgen Sie den Anweisungen.
|
||||
Um die Software zu installieren, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">hier klicken</a> und folgen Sie den Anweisungen.
|
||||
</p>
|
||||
</area-link>
|
||||
<p>Wenn Sie diese Anfrage nicht initiiert haben, ignorieren Sie diese Mail bitte.</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
Hola [[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>Usuario [[[USERNAME]]] en servidor <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> le solicita que instale software para iniciar una sesión de control remoto.</p>
|
||||
<p>Usuario [[[USERNAME]]] en servidor <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> le solicita que instale software para iniciar una sesión de control remoto.</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
Mensaje: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
Para instalar el software, <a href="[[[SERVERURL]]][[[LINKURL]]]">haga clic aquí</a> y siga las instrucciones.
|
||||
Para instalar el software, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">haga clic aquí</a> y siga las instrucciones.
|
||||
</p>
|
||||
</area-link>
|
||||
<p>Si Ud. no inicio este requerimiento, por favor ignore este correo.</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
Hei [[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>Käyttäjä [[[USERNAME]]] palvelimella <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> pyytää sinua asentamaan ohjelmiston etäohjausistunnon aloittamiseksi.</p>
|
||||
<p>Käyttäjä [[[USERNAME]]] palvelimella <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> pyytää sinua asentamaan ohjelmiston etäohjausistunnon aloittamiseksi.</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
Viesti: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
Asentaaksesi ohjelman, <a href="[[[SERVERURL]]][[[LINKURL]]]">klikkaa tästä</a> ja seuraa ohjeita.
|
||||
Asentaaksesi ohjelman, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">klikkaa tästä</a> ja seuraa ohjeita.
|
||||
</p>
|
||||
</area-link>
|
||||
<p>Jos et suorittanut tätä pyyntöä, voit ohitaa tämän sähköpostin.</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
Bonjour [[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>Utilisateur [[[USERNAME]]] sur le serveur <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> vous demande d'installer un logiciel pour démarrer une session de contrôle à distance.</p>
|
||||
<p>Utilisateur [[[USERNAME]]] sur le serveur <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> vous demande d'installer un logiciel pour démarrer une session de contrôle à distance.</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
Message: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
Pour installer le logiciel, <a href="[[[SERVERURL]]][[[LINKURL]]]">cliquez ici</a> et suivez les instructions.
|
||||
Pour installer le logiciel, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">cliquez ici</a> et suivez les instructions.
|
||||
</p>
|
||||
</area-link>
|
||||
<p>Si vous n'avez pas initié cette demande, veuillez ignorer ce courrier.</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
नमस्कार [[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>उपयोगकर्ता [[[USERNAME]]] सर्वर पर <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> रिमोट कंट्रोल सेशन शुरू करने के लिए आपको सॉफ्टवेयर इंस्टॉल करने का अनुरोध कर रहा है।</p>
|
||||
<p>उपयोगकर्ता [[[USERNAME]]] सर्वर पर <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> रिमोट कंट्रोल सेशन शुरू करने के लिए आपको सॉफ्टवेयर इंस्टॉल करने का अनुरोध कर रहा है।</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
संदेश: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
सॉफ़्टवेयर स्थापित करने के लिए, <a href="[[[SERVERURL]]][[[LINKURL]]]">यहाँ क्लिक करें</a> और निर्देशों का पालन करें।
|
||||
सॉफ़्टवेयर स्थापित करने के लिए, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">यहाँ क्लिक करें</a> और निर्देशों का पालन करें।
|
||||
</p>
|
||||
</area-link>
|
||||
<p>यदि आपने यह अनुरोध आरंभ नहीं किया है, तो कृपया इस मेल को अनदेखा करें।</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
[[[NAME]]]様
|
||||
</p>
|
||||
</area-name>
|
||||
<p>サーバー上のユーザー[[[USERNAME]]] <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> リモートコントロールセッションを開始するソフトウェアをインストールするように要求しています。</p>
|
||||
<p>サーバー上のユーザー[[[USERNAME]]] <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> リモートコントロールセッションを開始するソフトウェアをインストールするように要求しています。</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
メッセージ: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
ソフトウェアをインストールするには、 <a href="[[[SERVERURL]]][[[LINKURL]]]">ここをクリック</a> 指示に従ってください。
|
||||
ソフトウェアをインストールするには、 <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">ここをクリック</a> 指示に従ってください。
|
||||
</p>
|
||||
</area-link>
|
||||
<p>このリクエストを開始していない場合は、このメールを無視してください。</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
안녕하세요, [[[NAME]]]님.
|
||||
</p>
|
||||
</area-name>
|
||||
<p>서버의 [[[USERNAME]]] 사용자 <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> 원격 제어 세션을 시작하기 위해 소프트웨어 설치를 요청하고 있습니다.</p>
|
||||
<p>서버의 [[[USERNAME]]] 사용자 <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> 원격 제어 세션을 시작하기 위해 소프트웨어 설치를 요청하고 있습니다.</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
메시지: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -35,7 +35,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
소프트웨어를 설치하려면, <a href="[[[SERVERURL]]][[[LINKURL]]]">여기를 클릭하십시오.</a> 그리고 다음 지시들을 따르십시오.
|
||||
소프트웨어를 설치하려면, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">여기를 클릭하십시오.</a> 그리고 다음 지시들을 따르십시오.
|
||||
</p>
|
||||
</area-link>
|
||||
<p>이 요청을 시작하지 않은 경우, 이 메일을 무시하십시오.</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
Hallo [[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>Gebruiker [[[USERNAME]]] op server <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> vraagt u om de software te installeren om een ondersteunings sessie te starten.</p>
|
||||
<p>Gebruiker [[[USERNAME]]] op server <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> vraagt u om de software te installeren om een ondersteunings sessie te starten.</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
Bericht: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
Om de software te installeren, <a href="[[[SERVERURL]]][[[LINKURL]]]">Klik hier</a> en volg de instructies.
|
||||
Om de software te installeren, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">Klik hier</a> en volg de instructies.
|
||||
</p>
|
||||
</area-link>
|
||||
<p>Als u dit verzoek niet heeft ingediend, dan kunt u deze e-mail negeren.</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
Olá [[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>Usuário [[[USERNAME]]] no servidor <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> está solicitando a instalação de um software para iniciar uma sessão de controle remoto.</p>
|
||||
<p>Usuário [[[USERNAME]]] no servidor <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> está solicitando a instalação de um software para iniciar uma sessão de controle remoto.</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
Mensagem: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
Para instalar o software, <a href="[[[SERVERURL]]][[[LINKURL]]]">Clique aqui</a> e siga as instruções.
|
||||
Para instalar o software, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">Clique aqui</a> e siga as instruções.
|
||||
</p>
|
||||
</area-link>
|
||||
<p>Se você não iniciou esta solicitação, ignore este e-mail.</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
Здравствуйте, [[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>Пользователь [[[USERNAME]]] на сервере <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> просит вас установить программное обеспечение, чтобы начать сеанс удаленного управления.</p>
|
||||
<p>Пользователь [[[USERNAME]]] на сервере <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> просит вас установить программное обеспечение, чтобы начать сеанс удаленного управления.</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
Сообщение: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
Чтобы установить программное обеспечение, <a href="[[[SERVERURL]]][[[LINKURL]]]">кликните сюда</a> и следуйте инструкциям.
|
||||
Чтобы установить программное обеспечение, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">кликните сюда</a> и следуйте инструкциям.
|
||||
</p>
|
||||
</area-link>
|
||||
<p>Если вы не инициировали этот запрос, игнорируйте это письмо.</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
Merhaba [[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>Sunucudaki kullanıcı [[[USERNAME]]] <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> bir uzaktan kontrol oturumu başlatmak için yazılım yüklemenizi istiyor.</p>
|
||||
<p>Sunucudaki kullanıcı [[[USERNAME]]] <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> bir uzaktan kontrol oturumu başlatmak için yazılım yüklemenizi istiyor.</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
İleti: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
Yazılımı kurmak için, <a href="[[[SERVERURL]]][[[LINKURL]]]">buraya Tıkla</a> ve talimatları izleyin.
|
||||
Yazılımı kurmak için, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">buraya Tıkla</a> ve talimatları izleyin.
|
||||
</p>
|
||||
</area-link>
|
||||
<p>Bu isteği siz başlatmadıysanız, lütfen bu postayı dikkate almayın.</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
您好[[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>服务器上的使用者[[[USERNAME]]] <a href="[[[SERVERURL]]]">[[[SERVERNAME]]]</a> 正在要求您安装软件以启动远程控制会话。</p>
|
||||
<p>服务器上的使用者[[[USERNAME]]] <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]]</a> 正在要求您安装软件以启动远程控制会话。</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
消息: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
要安装软件, <a href="[[[SERVERURL]]][[[LINKURL]]]">点击这里</a> 并按照说明进行操作。
|
||||
要安装软件, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">点击这里</a> 并按照说明进行操作。
|
||||
</p>
|
||||
</area-link>
|
||||
<p>如果您没有发起此请求,请不理此邮件。</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
你好[[[NAME]]],
|
||||
</p>
|
||||
</area-name>
|
||||
<p>伺服器上的使用者[[[USERNAME]]] <a href="[[[SERVERURL]]]">[[[SERVERNAME]]</a> 正在要求你安裝軟體以啟動遠程控制會話。</p>
|
||||
<p>伺服器上的使用者[[[USERNAME]]] <a href="[[[SERVERURL]]][[[URLARGS1]]]">[[[SERVERNAME]]</a> 正在要求你安裝軟體以啟動遠程控制會話。</p>
|
||||
<area-msg>
|
||||
<p>
|
||||
訊息: <b notrans="1">[[[MSG]]]</b>
|
||||
@ -34,7 +34,7 @@
|
||||
</area-linux>
|
||||
<area-link>
|
||||
<p>
|
||||
要安裝軟體, <a href="[[[SERVERURL]]][[[LINKURL]]]">點擊這裡</a> 並按照說明進行操作。
|
||||
要安裝軟體, <a href="[[[SERVERURL]]][[[LINKURL]]][[[URLARGS2]]]">點擊這裡</a> 並按照說明進行操作。
|
||||
</p>
|
||||
</area-link>
|
||||
<p>如果你沒有發起此請求,請不理此電郵。</p>
|
||||
|
@ -551,7 +551,8 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"from": { "type": "string", "format": "email", "description": "Email address used in the messages from field." },
|
||||
"apikey": { "type": "string", "description": "The SendGrid API key." }
|
||||
"apikey": { "type": "string", "description": "The SendGrid API key." },
|
||||
"verifyemail": { "type": "boolean", "default": true, "description": "When set to false, the email format and DNS MX record are not checked." }
|
||||
},
|
||||
"required": [ "from", "apikey" ]
|
||||
},
|
||||
|
38
meshmail.js
38
meshmail.js
@ -178,8 +178,13 @@ module.exports.CreateMeshMail = function (parent) {
|
||||
var options = { email: email, servername: domain.title ? domain.title : 'MeshCentral', token: token };
|
||||
if (loginkey != null) { options.urlargs1 = '?key=' + loginkey; options.urlargs2 = '&key=' + loginkey; } else { options.urlargs1 = ''; options.urlargs2 = ''; }
|
||||
|
||||
// Get from field
|
||||
var from = null;
|
||||
if (parent.config.sendgrid && (typeof parent.config.sendgrid.from == 'string')) { from = parent.config.sendgrid.from; }
|
||||
else if (parent.config.smtp && (typeof parent.config.smtp.from == 'string')) { from = parent.config.smtp.from; }
|
||||
|
||||
// Send the email
|
||||
obj.pendingMails.push({ to: email, from: parent.config.smtp.from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
||||
obj.pendingMails.push({ to: email, from: from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
||||
sendNextMail();
|
||||
}
|
||||
});
|
||||
@ -206,8 +211,13 @@ module.exports.CreateMeshMail = function (parent) {
|
||||
var options = { username: username, accountname: accountname, email: email, servername: domain.title ? domain.title : 'MeshCentral', password: password };
|
||||
if (loginkey != null) { options.urlargs1 = '?key=' + loginkey; options.urlargs2 = '&key=' + loginkey; } else { options.urlargs1 = ''; options.urlargs2 = ''; }
|
||||
|
||||
// Get from field
|
||||
var from = null;
|
||||
if (parent.config.sendgrid && (typeof parent.config.sendgrid.from == 'string')) { from = parent.config.sendgrid.from; }
|
||||
else if (parent.config.smtp && (typeof parent.config.smtp.from == 'string')) { from = parent.config.smtp.from; }
|
||||
|
||||
// Send the email
|
||||
obj.pendingMails.push({ to: email, from: parent.config.smtp.from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
||||
obj.pendingMails.push({ to: email, from: from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
||||
sendNextMail();
|
||||
}
|
||||
});
|
||||
@ -235,8 +245,13 @@ module.exports.CreateMeshMail = function (parent) {
|
||||
if (loginkey != null) { options.urlargs1 = '?key=' + loginkey; options.urlargs2 = '&key=' + loginkey; } else { options.urlargs1 = ''; options.urlargs2 = ''; }
|
||||
options.cookie = obj.parent.encodeCookie({ u: userid, e: email, a: 1 }, obj.mailCookieEncryptionKey);
|
||||
|
||||
// Get from field
|
||||
var from = null;
|
||||
if (parent.config.sendgrid && (typeof parent.config.sendgrid.from == 'string')) { from = parent.config.sendgrid.from; }
|
||||
else if (parent.config.smtp && (typeof parent.config.smtp.from == 'string')) { from = parent.config.smtp.from; }
|
||||
|
||||
// Send the email
|
||||
obj.pendingMails.push({ to: email, from: parent.config.smtp.from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
||||
obj.pendingMails.push({ to: email, from: from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
||||
sendNextMail();
|
||||
}
|
||||
});
|
||||
@ -264,8 +279,13 @@ module.exports.CreateMeshMail = function (parent) {
|
||||
if (loginkey != null) { options.urlargs1 = '?key=' + loginkey; options.urlargs2 = '&key=' + loginkey; } else { options.urlargs1 = ''; options.urlargs2 = ''; }
|
||||
options.cookie = obj.parent.encodeCookie({ u: userid, e: email, a: 2 }, obj.mailCookieEncryptionKey);
|
||||
|
||||
// Get from field
|
||||
var from = null;
|
||||
if (parent.config.sendgrid && (typeof parent.config.sendgrid.from == 'string')) { from = parent.config.sendgrid.from; }
|
||||
else if (parent.config.smtp && (typeof parent.config.smtp.from == 'string')) { from = parent.config.smtp.from; }
|
||||
|
||||
// Send the email
|
||||
obj.pendingMails.push({ to: email, from: parent.config.smtp.from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
||||
obj.pendingMails.push({ to: email, from: from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
||||
sendNextMail();
|
||||
}
|
||||
});
|
||||
@ -297,8 +317,13 @@ module.exports.CreateMeshMail = function (parent) {
|
||||
options.link = (os == 4) ? 1 : 0;
|
||||
options.linkurl = createInviteLink(domain, meshid, flags, expirehours);
|
||||
|
||||
// Get from field
|
||||
var from = null;
|
||||
if (parent.config.sendgrid && (typeof parent.config.sendgrid.from == 'string')) { from = parent.config.sendgrid.from; }
|
||||
else if (parent.config.smtp && (typeof parent.config.smtp.from == 'string')) { from = parent.config.smtp.from; }
|
||||
|
||||
// Send the email
|
||||
obj.pendingMails.push({ to: email, from: parent.config.smtp.from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
||||
obj.pendingMails.push({ to: email, from: from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
||||
sendNextMail();
|
||||
}
|
||||
});
|
||||
@ -388,7 +413,8 @@ module.exports.CreateMeshMail = function (parent) {
|
||||
// Check the email domain DNS MX record.
|
||||
obj.approvedEmailDomains = {};
|
||||
obj.checkEmail = function (email, func) {
|
||||
if (parent.config.smtp.verifyemail === false) { func(true); return; }
|
||||
if ((parent.config.smtp) && (parent.config.smtp.verifyemail === false)) { func(true); return; }
|
||||
if ((parent.config.sendgrid) && (parent.config.sendgrid.verifyemail === false)) { func(true); return; }
|
||||
var emailSplit = email.split('@');
|
||||
if (emailSplit.length != 2) { func(false); return; }
|
||||
if (obj.approvedEmailDomains[emailSplit[1]] === true) { func(true); return; }
|
||||
|
@ -4065,7 +4065,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
}
|
||||
|
||||
// Perform email invitation
|
||||
parent.parent.mailserver.sendAgentInviteMail(domain, (user.realname ? user.realname : user.name), command.email.toLowerCase(), command.meshid, command.name, command.os, command.msg, command.flags, command.expire, parent.getLanguageCodes(req));
|
||||
parent.parent.mailserver.sendAgentInviteMail(domain, (user.realname ? user.realname : user.name), command.email.toLowerCase(), command.meshid, command.name, command.os, command.msg, command.flags, command.expire, parent.getLanguageCodes(req), req.query.key);
|
||||
|
||||
// Send a response if needed
|
||||
if (command.responseid != null) { try { ws.send(JSON.stringify({ action: 'inviteAgent', responseid: command.responseid, result: 'ok' })); } catch (ex) { } }
|
||||
|
Loading…
Reference in New Issue
Block a user