@icgio/icg-utils 1.9.39 → 1.9.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +0 -1
  2. package/package.json +1 -1
  3. package/lib/mail.js +0 -25
package/index.js CHANGED
@@ -5,7 +5,6 @@ module.exports = {
5
5
  influx: require('./lib/influxdb.js'),
6
6
  ip: require('./lib/ip.js'),
7
7
  logger: require('./lib/logger.js'),
8
- mail: require('./lib/mail.js'),
9
8
  observable: require('./lib/observable.js'),
10
9
  ohlcv: require('./lib/ohlcv'),
11
10
  rate_limiter: require('./lib/rate-limiter.js'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-utils",
3
- "version": "1.9.39",
3
+ "version": "1.9.40",
4
4
  "description": "Utils package.",
5
5
  "main": "index.js",
6
6
  "directories": {
package/lib/mail.js DELETED
@@ -1,25 +0,0 @@
1
- const logger = require('./logger.js')
2
-
3
- module.exports.send = function (address, subject, data, config) {
4
- const mailgun = require('mailgun-js')({
5
- apiKey: config.mail_api_key,
6
- domain: config.mail_domain,
7
- })
8
- let options = {
9
- from: config.mail_from_address,
10
- to: address,
11
- subject: config.message_prefix() + subject,
12
- }
13
- if (/<[a-z][\s\S]*>/i.test(data)) {
14
- options.html = data
15
- } else {
16
- options.text = data
17
- }
18
- mailgun.messages().send(options, (err, body) => {
19
- if (err) {
20
- logger.error('Mail sent error: %j', err)
21
- } else if (body.id) {
22
- logger.info('Mail sent successfully')
23
- }
24
- })
25
- }