mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 00:15:11 +03:00
parent
061d8c6ac3
commit
5e6a4f6f7d
@ -20,9 +20,14 @@ function createMailgun(config) {
|
||||
|
||||
function getInstance() {
|
||||
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 hasMailgunSetting = !!(bulkEmailSetting && bulkEmailSetting.apiKey && bulkEmailSetting.baseUrl && bulkEmailSetting.domain);
|
||||
|
||||
if (!hasMailgunConfig && !hasMailgunSetting) {
|
||||
logging.warn(`Bulk email service is not configured`);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user