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

newlines not in text_body #155

Open
atomkirk opened this issue Aug 9, 2023 · 1 comment
Open

newlines not in text_body #155

atomkirk opened this issue Aug 9, 2023 · 1 comment

Comments

@atomkirk
Copy link

atomkirk commented Aug 9, 2023

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
@atomkirk
Copy link
Author

atomkirk commented Aug 9, 2023

I think this would fix it. Want me to finish this PR? https://github.com/DockYard/elixir-mail/pull/139/files

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