Mailto for Android

A

Anonymous

Guest
Hi all,

I'm using this code to send out an email. It works fine on my Windows PC but not if used from an Android phone.
Is there something I need to change for it to work on Android?

Code:
<form method="post" action="mailto: <?php echo $epos ?>?Subject=Application for Leave for <?php echo $_SESSION['username']?>" enctype="text/plain">

Thanks
 
Hi,

To send an email you need to specify mailto: as URI using setData() method and data type will be to text/plain using setType() method as follows −

emailIntent.setData(Uri.parse("mailto:"));
emailIntent.setType("text/plain");

Thanks
 
Back
Top