Created
February 26, 2025 17:15
-
-
Save Sama-004/73e4b4d2b1797d8031d3da41c398c9dc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const messageParts = [ | |
`From: ${emailProvider.email}`, | |
`To: ${Array.isArray(data.to) ? data.to.join(', ') : data.to}`, | |
`Subject: ${encodeHeader(data.subject || '')}`, | |
`Date: ${date}`, | |
`Message-ID: ${data.messageId}`, | |
//this is what is causing the error | |
data.references?.length | |
? `References: ${data.references.join(' ')}` | |
: null, | |
data.inReplyTo ? `In-Reply-To: ${data.inReplyTo}` : null, | |
'MIME-Version: 1.0', | |
'Content-Type: multipart/alternative; boundary="boundary"', | |
'', | |
'--boundary', | |
'Content-Type: text/plain; charset=utf-8', | |
'Content-Transfer-Encoding: 7bit', | |
'', | |
body, | |
'', | |
'--boundary', | |
'Content-Type: text/html; charset=utf-8', | |
'Content-Transfer-Encoding: 7bit', | |
'', | |
htmlBody, | |
'', | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment