mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Cleaner Content-Type detection for mimeToMessage()
This commit is contained in:
parent
983a2db418
commit
384230f7bf
|
@ -62,7 +62,7 @@ const
|
||||||
mimeToMessage = (data, message) => {
|
mimeToMessage = (data, message) => {
|
||||||
// TODO: Check multipart/signed application/pgp-signature application/pgp-keys
|
// TODO: Check multipart/signed application/pgp-signature application/pgp-keys
|
||||||
const headers = data.split(/\r?\n\r?\n/)[0];
|
const headers = data.split(/\r?\n\r?\n/)[0];
|
||||||
if (/Content-Type:[\s\S]*?;\s*boundary=/.test(headers)) {
|
if (/Content-Type:[\s\S]*?/.test(headers)) {
|
||||||
// https://github.com/postalsys/postal-mime
|
// https://github.com/postalsys/postal-mime
|
||||||
(new PostalMime).parse(data).then(result => {
|
(new PostalMime).parse(data).then(result => {
|
||||||
// TODO: multipart/signed
|
// TODO: multipart/signed
|
||||||
|
|
Loading…
Reference in a new issue