This works perfectly on my phone when I export it as an HTML5 website, but when I export it as a debug APK (using Cordova) the email sending does not work, but the rest of the app does - any ideas, am I missing something obvious?
I have used code snippets that people have posted as examples and as I say it works when running as a site.
This used to work when building the APK via Cocoon.io but since they are no longer providing that service I have switched to Cordova and it no longer works.
and the AJAX commands are:-
Contents of c2mail.php
$to = $_POST['email_to'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$headers ='From: email@example.com' . "\r\n" .
'Reply-To: firstname.lastname@example.org' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
echo "Message sent at ";
echo date ("h:i:s");
My device is Android 9 - I am wondering if this is something to do with it, I wonder if it requires an SSL cert on the URL domain?
Does anyone have any ideas?
Thanks in advance!