Email link not working on Android
That's an issue with Android OS:
Issue 63538: Mailto links are parsed incorrectly, entered entirely into the address field
Devices Confirmed: Nexus 4 (two devices tested)
Android Version: 4.4.2 only (tested in 4.3 and 4.4.0)Bug details:
Mailto links are entirely entered into the address field instead of being parsed into Address, Subject and Body. Screenshot is attached showing issue.
Pancake_Senpai
Updated on June 04, 2022Comments
-
Pancake_Senpai almost 2 years
I have the code for a click to email link in HTML and it works fine on my pc but doesn't work on mobile devices (I only have Android so I don't know if the problem is only on Android or all mobile devices). When I press the link the browser says:
Webpage not available. "mailto:[email protected]?subject=Mileage%20%20%20&body="Todays%20date:%0D%0ABusiness%20Mileage:%0D%0ADid%20you%20have%20a%20business%20passenger?%0D%0AAdditional%20details:" might be temporarily down or it may have moved permanently to a new web address.
Can someone please tell me how to fix this problem it is vital that the Click to send email link works.
My code is below:
<p> <a href="mailto:[email protected]?subject=Mileage&body="Todays date:%0D%0ABusiness Mileage:%0D%0ADid you have a business passenger%0D%0AAdditional details:"> Click to send email </a> </p>
-
Pancake_Senpai over 10 yearsDo I have to change it from a link. Also, do I just paste this into my code in the place of my email link code in order to get it to work?
-
whitfin over 10 yearsIt's probably easier to change it for a button, and just place the above code in the OnClick() method.
-
whitfin over 10 years@user2627595 Hang on, I misunderstood. Updated answer.
-
whitfin over 10 years@user2627595 My old code was assuming you were doing it from inside an Android application (my mistake).