Reputation: 979
Hello I use Linking api to open mailto.
I try to call mail app using below
Linking.openURL('mailto://[email protected]&subject=abcdefg&body=body')
but It will open maill app with to:[email protected]&subject=abcdefg&body=body
subject and body are empty
Upvotes: 32
Views: 29188
Reputation: 148
Here are my cases:
return (Platform.OS === 'android')
? sms:1-408-555-1212?body=yourMessage
: sms:1-408-555-1212&body=yourMessage;
return (Platform.OS === 'android')
? mailto:[email protected]?cc=?subject=yourSubject&body=yourMessage
: mailto:[email protected]?cc=&subject=yourSubject&body=yourMessage;
Note: your mail url must contain cc=
even if you don't have any cc emails.
?
&
for the first parameter.
Upvotes: 4
Reputation: 7106
You need to remove the '//' in your url and add a '?' : mailto:[email protected]?subject=abcdefg&body=body
Upvotes: 60