Thanks for the solution, works fine now.
Maybe you can help me with my own php I used in 2.05 where it works perfect, but in 2.50 160311 I get a 500 error.
On the endpage I have an input area for the EMail-address so the participant can enter his EMail to participate in a lottery. per $.post I refer to my php which sends an EMail to me (the administrator) and contains the inserted E-Mail.
My php-file looks like this:
Code:
<?php
require("../application/third_party/phpmailer/class.phpmailer.php");
$maily = $_POST["mailaddress"];
checkEmail($maily);
$nameit =$_POST["Surveyname"];
function checkEmail($adr) {
$regEx = '^([^\s@,:"<>]+)@([^\s@,:"<>]+\.[^\s@,:"<>.\d]{2,}|(\d{1,3}\.){3}\d{1,3})$';
$proof = (preg_match("/$regEx/",$adr,$part)) ? $part : false;
if ($proof == false)
{
echo ("Ungültige E-Mail-Adresse");
exit;
}
}
$text = "<p>Es hat jemand das Formular ausgefüllt.<br>Die Daten lauten:</p>";
$text .= "<br>E-Mail: ";
$text .= $maily;
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "mailsurver.example.de"; // specify main and backup server
$mail->SMTPAuth = false; // turn off SMTP authentication
$mail->Username = ""; // SMTP username
$mail->Password = ""; // SMTP password
$mail->From = "server@example.de";
$mail->FromName = "me";
$mail->AddAddress("admin@example.de");
$betreff = "[Formular] ".$nameit;
$mail->AddReplyTo("admin@example.de", "Information");
$mail->Sender="admin@example.de";
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = $betreff;
$mail->Body = $text;
//$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
//$mail->SMTPDebug = 1; //for debugging
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Mail sent";
?>
As I mentioned this code worked great with 2.05. But now no EMail is send and I get an 500 internal error. What changed? I suggest it is something with the file class.phpmailer.php or another?
Thanks
Stefan