mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
parent
061d8c6ac3
commit
5e6a4f6f7d
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue