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="xxxx@xxxxx.edu.my";//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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.