cketti / EmailIntentBuilder

An Android Library for the creation of SendTo Intents with mailto: URI
Apache License 2.0
173 stars 19 forks source link

Cut off body #9

Open xrad opened 4 years ago

xrad commented 4 years ago

I'm using EmailIntentBuilder in my app Glimpse Notifications. The can create some log data and send it as an email to me. Recently, I'm getting mails where the body seems to be cut off. For example, the body should look like this:

Device = samsung, SM-J320F
Version = 5.1.1
Build = LMY47V.J320FXXU0AQL1
-------------------------
accel_tune_sensitivity=1
allow_adaptive_notifications=false
...

More data follows, a typical body would be 237 lines or 17k bytes.

But I only get:

Device

Is there any resonable explanation for this? Are there any lenth limitations? Any characters I should not use? Any side effects from the fixLineBreaks() method?

Just to be clear, only a fraction of emails are garbled like this. In one case I could determine that the user user Gmail as an email client, FWIW.

cketti commented 4 years ago

There is a limit to how much data can go into an Intent to start an app. But if you exceed the limit you'll probably get a TransactionTooLargeException.

You should be able to use any character. The ones that are not directly allowed in a mailto: URI will get percent-encoded.

Gmail used to work fine, but they seem to have changed their mailto: handling code and broke it in the process. See also #8.

xrad commented 4 years ago

Hm.... thanks for responding. But I'm not sure if #8 is related to this, really.

It seems interesting that the body text I try to send starts with "Device = ...." and then in the real mail it drops anything including and after the "=" sign. This seems a bit fishy to me. I just got a screen record of a user and it is really like they say. I see the entire buffer (which wasn't that long, actually) and then in Gmail almost everything is dropped. All fine when I tested this same function today with Gmail.