修复TG一些邮件解析为空和格式优化
This commit is contained in:
@@ -7,26 +7,26 @@ export default function emailMsgTemplate(email, tgMsgTo, tgMsgFrom, tgMsgText) {
|
||||
if (tgMsgFrom === 'only-name') {
|
||||
template += `
|
||||
|
||||
发件人:${email.name}`
|
||||
From\u200B:${email.name}`
|
||||
}
|
||||
|
||||
if (tgMsgFrom === 'show') {
|
||||
template += `
|
||||
|
||||
发件人:${email.name} <${email.sendEmail}>`
|
||||
From\u200B:${email.name} <${email.sendEmail}>`
|
||||
}
|
||||
|
||||
if(tgMsgTo === 'show' && tgMsgFrom === 'hide') {
|
||||
template += `
|
||||
|
||||
收件人:\u200B${email.toEmail}`
|
||||
To:\u200B${email.toEmail}`
|
||||
|
||||
} else if(tgMsgTo === 'show') {
|
||||
template += `
|
||||
收件人:\u200B${email.toEmail}`
|
||||
To:\u200B${email.toEmail}`
|
||||
}
|
||||
|
||||
const text = (email.text || emailUtils.htmlToText(email.content))
|
||||
const text = (emailUtils.formatText(email.text) || emailUtils.htmlToText(email.content))
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user