crazy manzaaa Posted August 11, 2006 Share Posted August 11, 2006 Hi all,I really need help to solve this problem. Does anyone ever experience the following error with phpMailer:Mailer Error: Language string failed to load: recipients_failedI use Apache 2.2.0 and PHP4.4.2. and only recently the email function on my website is broken and I got the above error message. Below is the code that I have:<CODE>require("class.phpmailer.php");require_once("class.smtp.php");require_once('phpmailer.lang-en.php') ;$mail = new PHPMailer();$mail->IsSMTP(); // set mailer to use SMTP$mail->Host = "<REMOVED>;<REMOVED>"; // specify main and backup server$mail->SMTPAuth = true; // turn on SMTP authentication$mail->Username = "<REMOVED>"; // SMTP username$mail->Password = "<REMOVED>"; // SMTP password$mail->From = $email;$mail->FromName = $name;$mail->AddAddress('<REMOVED>');$mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = $subject;$mail->Body = $message;$mail->AltBody = "This is the body in plain text for non-HTML users";$uploaddir = '<REMOVED>';$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);echo '<pre>';if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { $upload_ok = true;} else { $upload_ok = false;}$mail->AddAttachment($uploadfile);$mail->Send();if(!$mail->Send()){ echo "Message was not sent <br />"; echo "Mailer Error: " . $mail->ErrorInfo."<br />";}else{ echo "Message has been sent";}</CODE>I wonder if anyone knows how to get around with this? Any help would be greatly appreciated.Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/17269-php-mailer-help-recipients_failed/ Share on other sites More sharing options...
xAtlas Posted August 11, 2006 Share Posted August 11, 2006 [code]Whats with this? You notice that your code is a lot smaller (font size wise) and that it looks like the:echo '';Part of it isn't were is should it. Almost looks like it should be:echo ' '; but that even seems incomplete.I'm talking about below "$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);"btw- need to use [ code]text[/code] :) Link to comment https://forums.phpfreaks.com/topic/17269-php-mailer-help-recipients_failed/#findComment-73270 Share on other sites More sharing options...
crazy manzaaa Posted August 11, 2006 Author Share Posted August 11, 2006 Thanks xAtlas.Actually I figured out the problem already. It is related to SMTP server naming, and once I changed the SMTP server it worked like a charm. Too bad I spent so much time trying to debug the code :-[And I will use [ code] next time.Btw I'm new here and this forum looks very interesting. Link to comment https://forums.phpfreaks.com/topic/17269-php-mailer-help-recipients_failed/#findComment-73375 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.