I am trying to open an email client with mailto
url from my react-native app.
Code snippet used for opening a client:
const body = 'my email\nbody';
Linking.openURL(`mailto:email@example.com?subject=${subject}&body=${encodeURIComponent(body)}`);
The email client is opening (Android, Gmail), but no newlines are rendered.
I have also tried to use %0D%0A
and \r\n
, but no results.
Is it possible to add new lines in mailto
in react-native?
react-native: 0.61.0
Android: 9
` no longer works for me. `
` does not work at all in some other apps like Blue Mail. – John Harding Jan 18 '21 at 03:47