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:
What am I doing wrong?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”; ?>


Reply With Quote

Bookmarks