new_php85 Posted June 27, 2011 Share Posted June 27, 2011 Hye experts! Good day to you. I have refer to many references but still got same error. one of my reference is http://www.phpfreaks.com/forums/index.php?topic=180250.msg803886#msg803886 here is my code <?php session_start(); include 'includes/db_connect.php'; include 'phpmailer/class.phpmailer.php'; include 'phpmailer/class.smtp.php'; $title="Application for Venue Change"; $subject=$title; $name=$_REQUEST["name"]; $to="[email protected]";//my office email $content="This is to inform you that ".$name." has send Application for Venue Change."; $content=$content."\n\nSTUDENT INFORMATION :-"; $content=$content."\n\nName : ".$name; $content=$content."\nStudent No.: ".$_REQUEST["student_no"]; $content=$content."\nClass : ".$_REQUEST["classes"]; $content=$content."\n\nPlease go to http://xxx.xx.xxx.xx/AVC_VT/default.php for necessary action."; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "smtp.gmail.com"; $mail->AddAddress($to); $mail->From = $_REQUEST["name"]; $mail->FromName =$name; $mail->Subject =$subject; $mail->Body = $content; $mail->WordWrap = 1000; if(!$mail->Send()){echo "Message could not be sent. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit;} else{echo "<script language='JavaScript'> alert('success.');</script>";} ?> This part of the error message - "Language string failed to load" means that you did not copy the "language" folder that is part of the phpmailer script to your server. Based on information above which is Language folder, I also include them into my server. (Download php mailer and put them into server) I only change class.phpmailer.php and class.smtp.php to configure my : 1. host 2. port 3. username 4. password my path for php mailer is AVC_VT/phpmailer did i miss something. thank you Quote Link to comment https://forums.phpfreaks.com/topic/240494-mailer-error-language-string-failed-to-load-connect_host/ Share on other sites More sharing options...
gristoi Posted June 27, 2011 Share Posted June 27, 2011 is the language folder in the correct directory? Quote Link to comment https://forums.phpfreaks.com/topic/240494-mailer-error-language-string-failed-to-load-connect_host/#findComment-1235326 Share on other sites More sharing options...
new_php85 Posted June 28, 2011 Author Share Posted June 28, 2011 Language folder path is AVC_VT/phpmailer/language Quote Link to comment https://forums.phpfreaks.com/topic/240494-mailer-error-language-string-failed-to-load-connect_host/#findComment-1235743 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.