[RESOLVED] Language string failed to load: connect_host
Results 1 to 5 of 5

Thread: [RESOLVED] Language string failed to load: connect_host

  1. #1
    Junior Member
    Join Date
    May 2008
    Posts
    26

    resolved [RESOLVED] Language string failed to load: connect_host

    Hi all
    please, some body help me, its too strange that im trying 3 days to send an email but i cant. I use phpmailer and recieve this Mailer Error: Language string failed to load: connect_host
    this is my code, whats wrong?


    <?php

    require("class.phpmailer.php");
    $mail = new PHPMailer();
    $mail->IsSMTP();
    $mail->Host = "something";
    $mail->SMTPAuth = true;
    $mail->Username = "myusername";
    $mail->Password = "mypassword";
    $mail->From = "email1@domailname.com";
    $mail->FromName = "name1";
    $mail->AddAddress("email2@domainamel.com","name2");
    $mail->WordWrap = 50;
    $mail->IsHTML(true);
    $mail->Subject = "Here is the subject";
    $mail->Body = "this is testttttttt";
    $mail->AltBody = "This is the text-only body";
    if(!$mail->Send())
    {
    echo "Message was not sent <p>";
    echo "Mailer Error: " . $mail->ErrorInfo;
    exit;
    }
    ?>

  2. #2
    High Energy Magic Dept. NogDog's Avatar
    Join Date
    Aug 2006
    Location
    Ankh-Morpork
    Posts
    14,541
    If your include_path setting is not set up to point to the PHPMailer directory, then you will have to explicitly include the language file into your script. It will be something like:
    <path to PHPMailer directory>/language/phpmailer.lang-en.php (or whichever other language file you want to use)
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Junior Member
    Join Date
    May 2008
    Posts
    26

    Smile Language string failed to load: connect_host

    Quote Originally Posted by NogDog
    If your include_path setting is not set up to point to the PHPMailer directory, then you will have to explicitly include the language file into your script. It will be something like:
    <path to PHPMailer directory>/language/phpmailer.lang-en.php (or whichever other language file you want to use)

    Thank you so much. i did it

  4. #4
    Junior Member
    Join Date
    Jun 2008
    Posts
    1
    Hello,
    I'm having the same problem, but I don't understand, where do I place the directory to the language file. Do I have to if the PHP file is in the same folder as the language file?

  5. #5
    Senior Member
    Join Date
    Apr 2009
    Location
    Gran Canaria
    Posts
    114
    I am using PHP Mailer to send mail via Gmail.

    Sometimes I see "Language string failed to load: connect_host" error. This error is caused by Gmail and it's not a PHP Mailer problem.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •