我尝试了以下多部分内容类型。稍后我将使用SheetJS附加一个 excel 文件。但现在我无法附加有效的空白 excel 文件。任何帮助将不胜感激。
let text =
'To: User <user@domain.demo>\n' +
'Subject: TW Order\n' +
'X-Unsent: 1\n' +
'Content-Type: multipart/mixed; boundary=--boundary_text_string\n\n' +
'----boundary_text_string\n' +
//'Content-Type: application/application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; name=demo.xlsx\n' +
'Content-Type: application/octet-stream; name=demo.xlsx\n' +
'Content-Disposition: attachment;\n\n' +
'----boundary_text_string--';