mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 01:40:21 +03:00
parent
061d8c6ac3
commit
5e6a4f6f7d
@ -20,9 +20,14 @@ function createMailgun(config) {
|
|||||||
|
|
||||||
function getInstance() {
|
function getInstance() {
|
||||||
const bulkEmailConfig = configService.get('bulkEmail');
|
const bulkEmailConfig = configService.get('bulkEmail');
|
||||||
const bulkEmailSetting = settingsCache.get('bulk_email_settings');
|
const bulkEmailSetting = {
|
||||||
|
apiKey: settingsCache.get('mailgun_api_key'),
|
||||||
|
domain: settingsCache.get('mailgun_domain'),
|
||||||
|
baseUrl: settingsCache.get('mailgun_base_url')
|
||||||
|
};
|
||||||
const hasMailgunConfig = !!(bulkEmailConfig && bulkEmailConfig.mailgun);
|
const hasMailgunConfig = !!(bulkEmailConfig && bulkEmailConfig.mailgun);
|
||||||
const hasMailgunSetting = !!(bulkEmailSetting && bulkEmailSetting.apiKey && bulkEmailSetting.baseUrl && bulkEmailSetting.domain);
|
const hasMailgunSetting = !!(bulkEmailSetting && bulkEmailSetting.apiKey && bulkEmailSetting.baseUrl && bulkEmailSetting.domain);
|
||||||
|
|
||||||
if (!hasMailgunConfig && !hasMailgunSetting) {
|
if (!hasMailgunConfig && !hasMailgunSetting) {
|
||||||
logging.warn(`Bulk email service is not configured`);
|
logging.warn(`Bulk email service is not configured`);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user