|
|
|
@ -81,8 +81,11 @@ export const getEmailDetailAction = async (params) => {
|
|
|
|
|
let mailType = result.MailInfo?.[0]?.MAI_ContentType || '';
|
|
|
|
|
mailType = mailType === '' && (result.MailContent||'').includes('<html') ? 'text/html' : mailType;
|
|
|
|
|
|
|
|
|
|
const emailInfo = encodeEmailInfo(result.MailInfo?.[0] || {});
|
|
|
|
|
const isFromHub = emailInfo.MAI_From.includes('info@chinahighlights.net');
|
|
|
|
|
|
|
|
|
|
const delLinefeed = mailType === 'text/html' ? (result.MailContent||'').includes('<html') ? true : false : true;
|
|
|
|
|
const cleanContent = (result.MailContent || '').replace(/\r\n/g, delLinefeed ? '' : ''); // <br>
|
|
|
|
|
const cleanContent = (result.MailContent || '').replace(/\r\n/g, delLinefeed ? '' : (isFromHub ? '<br>' : ''));
|
|
|
|
|
|
|
|
|
|
const { html, bodyContent, bodyText } = mailType === 'text/html' ? parseHTMLString(cleanContent, true) : { html: '', bodyContent: '', bodyText: '' };
|
|
|
|
|
|
|
|
|
|