I have a little problem with an iOS cordova Webapp and PHP. The code below works perfectly on the computer(Xampp):
<?php
require 'lib/sendMail.php';
require '../php/PHPMailerAutoload.php';
$mail = new PHPMailer;
$sendMail = new sendMail();
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'ex@ex.de';
$mail->Password = 'expw';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->From = 'ex@ex.com';
$mail->FromName = 'Mailer';
$mail->addAddress($_POST['termin']['cityemail']);
$mail->isHTML(true);
$mail->Subject = 'ex';
$mail->Body = $sendMail->getMessage($_POST);
$mail->AltBody = $sendMail->getMessage($_POST);
if(!$mail->send()) {
print 'Message could not be sent.';
print 'Mailer Error: ' . $mail->ErrorInfo;
} else {
print 'Message has been sent';
}
?>
Note: I am using PhpMailer to send mails via the phone.
The problem is, that the phone is going crazy. Everything after "->" is ignored or something. This is how the screen looks after submitting the form:
How can this happen? The email is sending successfully on the browser.
The device is iPhone 5S 16GB with iOS 8.1.