Looking to develop a mobile application that can send emails with both single and multiple attachments across Android and iOS platforms.
Initially attempted using JavaScript on android, but seeking a solution that can work seamlessly on both android and ios.
<!DOCTYPE html>
<html>
<head>
<script>
function sendMail() {
var link = "mailto:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6a070f2a0f120b071a060f44090507">[email protected]</a>"
+ "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="744b171749190d37371510100611070734110c15190418115a171b19">[email protected]</a>"
+ "&subject=" + escape("This is my subject")
+ "&body=" + escape(document.getElementById('myText').value)
;
window.location.href = link;
}
</script>
</head>
<body>
<button onclick="sendMail(); return false">Send</button>
</body>
</html>
The current solution opens Outlook 2000 which is not ideal for mobile phones. Looking for a way to open the default Gmail app on the phone, with the sender as the logged-in user and dynamically add the receiver's id.
Also explored Java but encountered limitations when it comes to sending attachments from the client-side.
If you have any suggestions or solutions that could meet these requirements, I would greatly appreciate it. Thank you!