Skip to content
New issue

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

Not parsing text/plain alternative body #135

Open
mjforan opened this issue Dec 15, 2024 · 0 comments
Open

Not parsing text/plain alternative body #135

mjforan opened this issue Dec 15, 2024 · 0 comments

Comments

@mjforan
Copy link

mjforan commented Dec 15, 2024

Many apprise notifier services do not accept HTML, so it is desirable to select the text/plain body instead of text/html. The current implementation of multipart parsing does not work for me. Specifically, I am receiving emails from a Vaultwarden instance which look like this (content removed):

Message-ID: <[email protected]>
To: [email protected]
From: Vaultwarden <[email protected]>
Subject: Join Vaultwarden
MIME-Version: 1.0
Date: Sun, 15 Dec 2024 16:06:17 +0000
Content-Type: multipart/alternative;
 boundary="vgKXVg4d5YpsJGi6MgrgT0k4G2AUQeXLDzp5guXW"

--vgKXVg4d5YpsJGi6MgrgT0k4G2AUQeXLDzp5guXW
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

--vgKXVg4d5YpsJGi6MgrgT0k4G2AUQeXLDzp5guXW
Content-Type: multipart/related;
 boundary="QVY5Vete64ETsCmogCKhhgk7HyPE8GPOJYGctGrJ"

--QVY5Vete64ETsCmogCKhhgk7HyPE8GPOJYGctGrJ
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

--QVY5Vete64ETsCmogCKhhgk7HyPE8GPOJYGctGrJ
Content-ID: <logo-gray.png>
Content-Disposition: inline
Content-Type: image/png
Content-Transfer-Encoding: base64

--QVY5Vete64ETsCmogCKhhgk7HyPE8GPOJYGctGrJ
Content-ID: <mail-github.png>
Content-Disposition: inline
Content-Type: image/png
Content-Transfer-Encoding: base64

--QVY5Vete64ETsCmogCKhhgk7HyPE8GPOJYGctGrJ--

--vgKXVg4d5YpsJGi6MgrgT0k4G2AUQeXLDzp5guXW--

The current parser only gets the multipart/related section, missing the text/plain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant