Mailto Invalid URI: The Hostname Could Not be Parsed.

If the Uri is “mailto”, the Uri format must be in the following format. Feedback&body=Hi there, I really liked your app.

I encountered following error

System.UriFormatException: Invalid URI: The hostname could not be parsed.

It was difficult to find the root cause. Finally I found that I used “&subject” (ampersand) for the first parameter instead of “?subject” (question mark). Once I used “?subject”, everything worked as expected.



Leave a Reply

Your email address will not be published. Required fields are marked *