import { join } from 'path'
import { EmailPayload } from '@shared/models'
import { SendEmailDefaultOptions } from '../../shared/models/server/emailer.model'
-import { isTestInstance, root } from '../helpers/core-utils'
+import { isTestInstance } from '../helpers/core-utils'
+import { root } from '@shared/core-utils'
import { bunyanLogger, logger } from '../helpers/logger'
import { CONFIG, isEmailEnabled } from '../initializers/config'
import { WEBSERVER } from '../initializers/constants'
const email = new Email({
send: true,
+ htmlToText: {
+ selectors: [
+ { selector: 'img', format: 'skip' },
+ { selector: 'a', options: { hideLinkHrefIfSameAsText: true } }
+ ]
+ },
message: {
from: `"${fromDisplayName}" <${CONFIG.SMTP.FROM_ADDRESS}>`
},
}
}
- // overriden/new variables given for a specific template in the payload
+ // overridden/new variables given for a specific template in the payload
const sendOptions = merge(baseOptions, options)
await email.send(sendOptions)