Associate
- Joined
- 1 Jan 2007
- Posts
- 355
Hi Guys,
Can you please help with a problem.
I installed PHPMailer & run a basic email script but I am getting this message: -
Message could not be sent.
Mailer Error: Language string failed to load: provide_address
I have placed the phpmailer.lang-en.php script in the same directory as the other mailer scripts & amended the script to include the recepients email address but still get the same message.
Any ideas on what I could be doing wrong?
Here is my tester script: -
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "example.btinternet.com"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "username"; // SMTP username
$mail->Password = "password"; // SMTP password
$mail->From = "Myemailaddress";
$mail->FromName = "Fromname";
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
?>
Can you please help with a problem.
I installed PHPMailer & run a basic email script but I am getting this message: -
Message could not be sent.
Mailer Error: Language string failed to load: provide_address
I have placed the phpmailer.lang-en.php script in the same directory as the other mailer scripts & amended the script to include the recepients email address but still get the same message.
Any ideas on what I could be doing wrong?
Here is my tester script: -
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "example.btinternet.com"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "username"; // SMTP username
$mail->Password = "password"; // SMTP password
$mail->From = "Myemailaddress";
$mail->FromName = "Fromname";
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
?>