We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
text/plain alternative part disappears when adding inline Image
const x = createMimeMessage(); x.setSender({name: "Test", addr: "[email protected]"}); x.setRecipient("[email protected]"); x.setSubject("This is a test"); x.addMessage({ contentType: 'text/html', data: "<h1>Lorem ipsum dolor sit amet...</h1>" }); x.addMessage({ contentType: 'text/plain', data: "Lorem ipsum dolor sit amet..." }); x.addAttachment({ inline: true, filename: "test.png", contentType: "image/png", data: "dGVzdA==", headers: { "Content-ID": "test" } }); x.addAttachment({ filename: "test.pdf", contentType: "application/pdf", data: "dGVzdA==" }); console.log(x.asRaw());
Output:
Date: Wed, 06 Mar 2024 08:25:38 +0000 From: =?utf-8?B?VGVzdA==?= <[email protected]> To: <[email protected]> Message-ID: <[email protected]> Subject: =?utf-8?B?VGhpcyBpcyBhIHRlc3Q=?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=lu9hrte8tx --lu9hrte8tx Content-Type: multipart/related; boundary=11ntqiz482y --11ntqiz482y Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit <h1>Lorem ipsum dolor sit amet...</h1> --11ntqiz482y Content-ID: <test> Content-Type: image/png; name="test.png" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="test.png" dGVzdA== --11ntqiz482y-- --lu9hrte8tx Content-Type: application/pdf; name="test.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.pdf" dGVzdA== --lu9hrte8tx--
Output without "inline: true":
Date: Wed, 06 Mar 2024 08:27:31 +0000 From: =?utf-8?B?VGVzdA==?= <[email protected]> To: <[email protected]> Message-ID: <[email protected]> Subject: =?utf-8?B?VGhpcyBpcyBhIHRlc3Q=?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=5fll5crxif3 --5fll5crxif3 Content-Type: multipart/alternative; boundary=qqzy1z2de9f --qqzy1z2de9f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Lorem ipsum dolor sit amet... --qqzy1z2de9f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit <h1>Lorem ipsum dolor sit amet...</h1> --qqzy1z2de9f-- --5fll5crxif3 Content-ID: <test> Content-Type: image/png; name="test.png" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.png" dGVzdA== --5fll5crxif3 Content-Type: application/pdf; name="test.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.pdf" dGVzdA== --5fll5crxif3--
The text was updated successfully, but these errors were encountered:
Just stumbled upon this as well, also so far the inline image isn't working, data base64 encoded data won't show up in the emails source 🤔
Sorry, something went wrong.
Created a PR #70 which should fix it 🤞🏼
Till then I personally vendored the src into my project so I can move forward 🤓
Successfully merging a pull request may close this issue.
text/plain alternative part disappears when adding inline Image
Output:
Output without "inline: true":
The text was updated successfully, but these errors were encountered: