- Posts: 54
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
ERROR 500 while sending E-Mail
- Liod_DS
- Topic Author
- Offline
- Senior Member
Less
More
8 years 2 weeks ago - 8 years 2 weeks ago #132914
by Liod_DS
keep improving
ERROR 500 while sending E-Mail was created by Liod_DS
Hi all,
Today I've upgraded our LS installation to [2.50+ Build 160309] everything went fine (except for my template, but i was aware of the incompatibility of the 2.06+ templates) ....
BUT when I try to send the email invitation(by token table) an error 500 occurs (exactly when i press "send" )...
Any suggestions ? i don't think i mess up something in the upgrade process :dry: all the other functions works pretty well...
EDIT:
in my last installation the mail were totally ok, and the configuration is the same
Today I've upgraded our LS installation to [2.50+ Build 160309] everything went fine (except for my template, but i was aware of the incompatibility of the 2.06+ templates) ....
BUT when I try to send the email invitation(by token table) an error 500 occurs (exactly when i press "send" )...
Any suggestions ? i don't think i mess up something in the upgrade process :dry: all the other functions works pretty well...
EDIT:
in my last installation the mail were totally ok, and the configuration is the same
keep improving
Last edit: 8 years 2 weeks ago by Liod_DS. Reason: new info
The topic has been locked.
- Drewskie
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 1
8 years 2 weeks ago #132930
by Drewskie
Replied by Drewskie on topic ERROR 500 while sending E-Mail
The topic has been locked.
- Liod_DS
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 54
- Thank you received: 1
8 years 2 weeks ago #132940
by Liod_DS
keep improving
Replied by Liod_DS on topic ERROR 500 while sending E-Mail
Ok Thanks!
I hope to find a quick fix before the patch release!
Deiv
I hope to find a quick fix before the patch release!
Deiv
keep improving
The topic has been locked.
- Drewskie
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 1
8 years 2 weeks ago #132943
by Drewskie
Replied by Drewskie on topic ERROR 500 while sending E-Mail
Issue is resolved, will be in next update or can get it from link in bug report.
The topic has been locked.
- steve_81
- Offline
- Premium Member
Less
More
- Posts: 136
- Thank you received: 37
8 years 1 week ago #133025
by steve_81
Replied by steve_81 on topic ERROR 500 while sending E-Mail
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:
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
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&uuml;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
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
8 years 1 week ago #133029
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic ERROR 500 while sending E-Mail
We update phpMailer
github.com/LimeSurvey/LimeSurvey/commit/...5eda44f13238a73a77cb
Same can be apply to your php code.
But actually : seem better to use afterSUrveyComplete plugin event.
github.com/LimeSurvey/LimeSurvey/commit/...5eda44f13238a73a77cb
Same can be apply to your php code.
But actually : seem better to use afterSUrveyComplete plugin event.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- steve_81
- Offline
- Premium Member
Less
More
- Posts: 136
- Thank you received: 37
8 years 1 week ago #133032
by steve_81
Replied by steve_81 on topic ERROR 500 while sending E-Mail
Perfect, that did the trick, thanks.
Until now I'm not familiar with plugins but maybe the time has come.
Until now I'm not familiar with plugins but maybe the time has come.
The topic has been locked.