Mailto for Android

Discussing Html . Code , Software , other

Moderators: egami, macek, gesf

Post Reply
LabourSoft
New php-forum User
New php-forum User
Posts: 11
Joined: Sat Jul 04, 2015 9:50 pm

Sat Jul 04, 2015 10:33 pm

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: Select all

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

johnmacd
New php-forum User
New php-forum User
Posts: 72
Joined: Wed Jun 12, 2013 9:30 pm
Contact:

Thu Apr 07, 2016 3:31 am

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

Post Reply