React-native-share: [Documentation] Title vs Subject

Created on 23 Jan 2019  路  3Comments  路  Source: react-native-share/react-native-share

It looks like subject is used for email and the title in other cases. Some detailed documentation would be great so users understand what is used, where, and when.

The behavior seems a little inconsistent from my testing when using both title and subject. The Android Mail app will append title to the body thus accounting for a repeated subject but on iOS this works as expected. Also, one field is ignored in some cases and both in others.

I realize that this is quite dependent upon the app being used to share but just wondering if we can provide more information for a better understanding?

discussion docs help wanted

Most helpful comment

[iOS] Behavior is different depending on destination app selected.

From trial and error:

  • Apple mail app - 'subject' and 'message' appear as expected.

    • Even HTML message text is working. Excellent!

  • SMS - Only 'message' appears which is fine.

    • Multiple email attachments work. Very good.

  • Gmail and Outlook mail app

    • 'message' replaces the email subject. This seems like a bug?'

    • 'subject' is not used and does not appear.

    • 'title' is not used and does not appear.

    • Multiple email attachments work. Very good.

    • [Outlook] - When press send, I get "Unable to deliver message at this time". "Please open the Outlook app to send the draft"

const shareOptions = { subject: 'subject', title: 'title', message: 'message', social: Share.Social.EMAIL, failOnCancel: false, urls, };

All 3 comments

[iOS] Behavior is different depending on destination app selected.

From trial and error:

  • Apple mail app - 'subject' and 'message' appear as expected.

    • Even HTML message text is working. Excellent!

  • SMS - Only 'message' appears which is fine.

    • Multiple email attachments work. Very good.

  • Gmail and Outlook mail app

    • 'message' replaces the email subject. This seems like a bug?'

    • 'subject' is not used and does not appear.

    • 'title' is not used and does not appear.

    • Multiple email attachments work. Very good.

    • [Outlook] - When press send, I get "Unable to deliver message at this time". "Please open the Outlook app to send the draft"

const shareOptions = { subject: 'subject', title: 'title', message: 'message', social: Share.Social.EMAIL, failOnCancel: false, urls, };

Any update on this ? I am also facing this issue with Gmail and Outlook client on iOS with react-native-share 1.1.3 while sharing a PDF file with RN-FETCH-BLOB.

I tried to share a PDF with Outlook (iOS), subject & title are completely ignored, message is pasted into the subject and body, on the contrary file attachment works. I tried to use activityItemSources to maybe access subject and recipient-mail-address but couldn't figure it out.
Also: even when the default mail-app in settings is set to outlook, i can't use Share.single with social set to Share.Social.EMAIL to open Outlook.
Current Setup: "react-native": "~0.63.3", "react-native-share": "4.1.0",
I hope either this issue gets addressed and fixed or there can be some workaround provided eg. to use the activityItemSources.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saifkamaal picture saifkamaal  路  3Comments

jgfidelis picture jgfidelis  路  3Comments

desis123 picture desis123  路  3Comments

MrHazimAli picture MrHazimAli  路  3Comments

naveedmastan picture naveedmastan  路  3Comments