Jump to content

Mailer Error: Language string failed to load: connect_host


new_php85

Recommended Posts

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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.