www.webdeveloper.com
Results 1 to 2 of 2

Thread: PHPMailer & Language string failed to load: connect_host

  1. #1
    Join Date
    Apr 2007
    Posts
    88

    Question PHPMailer & Language string failed to load: connect_host

    I'm having an issue with PHPMailer. I'm getting following error: "Language string failed to load: connect_host" my languages file are located (../lib/phpmailer/language/phpmailer.lang-en.php) relative to my php file.

    My code is here:

    Code:
    <?php
    require(”../lib/phpmailer/class.phpmailer.php”);
    
    
    $mail = new PHPMailer();
    $mail->IsSMTP();          // set mailer to use SMTP
    $mail->SMTPAuth = true;   // turn on SMTP authentication
    $mail->Host = “smtp.gmail.com”; // specify main and backup server
    $mail->SMTPSecure= ’ssl’; //  Used instead of TLS when only POP mail is selected
    $mail->Port = 465;        //  Used instead of 587 when only POP mail is selected
    
    $mail->Username = “youremail@gmail.com”;  // SMTP username, you could use your google apps address too.
    $mail->Password = “yaourextremelynotlamepassword”; // SMTP password
    
    $mail->From = “youremail@gmail.com”; //Aparently must be the same as the UserName
    $mail->FromName = “Your name”;
    $mail->Subject = ‘The subject’;
    $mail->Body = “The body of your message”;
    
    foreach ($update_emails as $name => $email) {
      $mail->AddBcc($email, $name);
    }
    
    if(!$mail->Send())
    {
      echo “There was an error sending the message:” . $mail->ErrorInfo;
      exit;
    }
    echo “Thanks”;
    ?>
    What am I doing wrong?

  2. #2
    Join Date
    Apr 2007
    Posts
    88
    anyone have any thoughts on this issue?

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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



Recent Articles