elixir-mail
elixir-mail copied to clipboard
newlines not in text_body
Version
0.3.1
Test Case
I've got a part that looks like this:
--64d3a96e_e3a6714_fa43
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
ok well I will
My Name
On Aug 9, 2023 at 8:57 AM -0600, Some Name <[email protected]>, wrote:
> let us know any time
>
> My Name
> On Aug 9, 2023 at 8:51 AM -0600, My Name <[email protected]>, wrote:
> > ok that sounds good
> >
> > My Name
> > On Aug 9, 2023 at 8:49 AM -0600, My Name <[email protected]>, wrote:
> > > We had a follow-up question about pricing. If we get 200 seats and then add 10 more half way through the month, is that prorated or what?
> > >
> > > My Name
--64d3a96e_e3a6714_fa43
Steps to reproduce
{:ok, rfc2822} <- Base.url_decode64(gmail_raw)
%Mail.Message{} = message <- Mail.parse(rfc2822),
Mail.get_text(message).body |> dbg()
Expected Behavior
I would expect the body of the text part to be:
ok well I will
My Name
On Aug 9, 2023 at 8:57 AM -0600, Some Name <[email protected]>, wrote:
> let us know any time
>
> My Name
> On Aug 9, 2023 at 8:51 AM -0600, My Name <[email protected]>, wrote:
> > ok that sounds good
> >
> > My Name
> > On Aug 9, 2023 at 8:49 AM -0600, My Name <[email protected]>, wrote:
> > > We had a follow-up question about pricing. If we get 200 seats and then add 10 more half way through the month, is that prorated or what?
> > >
> > > My Name
Actual Behavior
Instead, it has no newlines:
ok well I willMy NameOn Aug 9, 2023 at 8:57 AM -0600, Some Name <[email protected]>, wrote:> let us know any time>> My Name> On Aug 9, 2023 at 8:51 AM -0600, My Name <[email protected]>, wrote:> > ok that sounds good> >> > My Name> > On Aug 9, 2023 at 8:49 AM -0600, My Name <[email protected]>, wrote:> > > We had a follow-up question about pricing. If we get 200 seats and then add 10 more half way through the month, is that prorated or what?> > >> > > My Name
I think this would fix it. Want me to finish this PR? https://github.com/DockYard/elixir-mail/pull/139/files