We are working on an iOS app and we happen to be using the Gmail app's URL Scheme to compose a new email for the user. We figured out most of it, however we are having some trouble adding new lines in the body of the email. So far our URL looks like this:
googlegmail://[email protected]&[email protected]&subject=TITLE&body=What%20ever%20they%20include%20for%20the%20body
We have already tried using %0D%0A
, as well as a few other options, however none of those seem to work. Is there any way to add a new line through the URL or is that just not possible?
I have only used this scheme once before and I didn't need the ability to create new lines, but after taking a look at it, I'm as stumped as you are. My guess is that this isn't possible using this method. It seems to me that it only focuses on putting spaces between words.
One thing I would recommend looking into is the Gmail API for iOS. You will most likely have much more luck with this and there's also the upside of having more control over your messages. You can easily install it with CocoaPods and it doesn't take long to set up at all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With