-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Command line option for sending test email
Implements #430
- Loading branch information
1 parent
6b1de43
commit 4899e6c
Showing
5 changed files
with
81 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const globals = require('../globals'); | ||
const { sendEmailBasic } = require('./smtp'); | ||
|
||
function sendTestEmail(emailAddress) { | ||
try { | ||
sendEmailBasic( | ||
'noreply', | ||
[emailAddress], | ||
'normal', | ||
'Test email from Butler for Qlik Sense', | ||
"This is a test email sent from your friendly Butler for Qlik Sense Enterprise on Windows.\n\nIf you get this email Butler's email configuration is correct and working." | ||
); | ||
} catch (err) { | ||
globals.logger.error(`TEST EMAIL: ${err}`); | ||
} | ||
} | ||
|
||
module.exports = { | ||
sendTestEmail, | ||
}; |