Multiple attachements paths make the body disappear (Android)
See original GitHub issueUsing flutter_email_sender: 4.0.0
, I noticed a bug in Android : if I add multiple files path when instanciating an Email
object, the body is not taken into account anymore. The Mail app used is GMail.
With the following code, I get an email with the body and one file
final Email email = Email(
body: 'Here you go, find the files enclosed',
subject: 'Exporting files',
recipients: emails,
attachmentPaths: ['workZip.path'],
isHTML: false,
);
With the following code, I get an email with two files but no more body
final Email email = Email(
body: 'Here you go, find the files enclosed',
subject: 'Exporting files',
recipients: emails,
attachmentPaths: ['workZip.path, info.csv'],
isHTML: false,
);
Are you able to reproduce it ? Any ideas on what is happening there ?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Files in Android Scoped Storage Get Randomly Deleted
I have a navigation-like application in Google Play and I have switched to scoped storage recently. The application needs to download the map ......
Read more >New features in Android Studio Preview
This page lists the new features introduced in Android Studio preview releases. The preview builds provide early access to the latest features and ......
Read more >How to find all of your downloads on an Android device
Your downloads on Android devices are stored in the Downloads folder in the My Files or File Manager app. Here's how to access...
Read more >ClassCastException warning in log when opening e-mail app ...
Just one string for the body, even though we're sending multiple files. intent.putExtra(Intent.EXTRA_TEXT, body);
Read more >Content-Disposition - HTTP - MDN Web Docs
In a multipart/form-data body, the HTTP Content-Disposition general ... When dealing with multiple files in the same field (for example, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, just ran into the same behavior - thanks for documenting 😃
Single attachment -> everything’s fine
Multiple attachments -> attachments show in the mail, but no body. body is available (print… 🙄) just prior to invoking send.
I tried this small change and it seems to work well both for multiple attachments and for a single one:
https://github.com/petrblahos/flutter_email_sender/commit/4da0b914f9fe45fa98a875ca1c616d2bc5eb66d0
I haven’t tried html body though.
Can somebody comment on why intent.putCharSequenceArrayListExtra was used and not just intent.putExtra?