/    Sign up×
Community /Pin to ProfileBookmark

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 = “[email protected]”; // SMTP username, you could use your google apps address too.
$mail->Password = “yaourextremelynotlamepassword”; // SMTP password

$mail->From = “[email protected]”; //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”;
?>
[/CODE]

What am I doing wrong?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@po3authorJun 08.2009 — anyone have any thoughts on this issue?
×

Success!

Help @po3 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...