Hi, - Is this on-topic ?

Ive sucesfully been using PHP mailer for over a year - No problems..

Ive switched email hosting services, & keeping my website/PHP scripts
with my existing host.

Now - With ONLY changing the server & username/passsword - PHPmailer
now stops (something to do with the language files).

Ive checked & the language files are there...

Heres my code :-

(In my actual script, the username/password are correct....)

================================
$mail = new PHPMailer();
#$mail->$Encoding  = "quoted-printable";
$mail->IsSMTP();                                   // send via SMTP
#$mail->Host     = "mail.kwister.com"; // SMTP servers
$mail->Host     = "mta0.net24.net.nz"; // SMTP servers

### new server

$mail->SMTPAuth = true;     // turn on SMTP authentication
$mail->Username = "USER";  // SMTP username
$mail->Password = "PASSWORD"; // SMTP password

$mail->From     = $from;
$mail->Sender     = $from;
$mail->FromName = "$from";
$mail->AddAddress("$to");
$mail->AddReplyTo("$from");

$mail->WordWrap = 70;                              // set word wrap
#$mail->AddAttachment("/var/tmp/file.tar.gz");      // attachment
#$mail->AddAttachment("/tmp/image.jpg", "new.jpg");
$mail->IsHTML(false);                               // send as HTML

$mail->Subject  =  $subject;

#$mymsg = imap_qprint($text);
#$text=$mymsg;

$mail->Body     =  $text;
#$mail->AltBody  =  $text;

if(!$mail->Send())
{
   echo "Message was not sent <p>";
   echo "Mailer Error: " . $mail->ErrorInfo;
echo "\nSELECTED FILE - FILE1 = '$file1'\n";
echo "SELECTED3 - '$file'\n";
if (file_exists($file1)) {
unlink($file1);
echo "DELETED $file1\n";
}
   exit;
}
================================


Heres the error / result :-

============================
from my cron-job / scheduled tasks :-


Message was not sent <p>Mailer Error: Language string failed to load:
[EMAIL PROTECTED]

when activating the script via the website / Http  :-

Mailer Error: SMTP Error: The following recipients failed: [EMAIL PROTECTED]

============================


As I said, its been going for over a year - & ive only changed the email server.

Does this mean my password etc is incorrect ? & any advise on how to
target in on the correct problem/solution ?


-- 
G
NZ community groups - [EMAIL PROTECTED]
Freecycle Auckland :-
http://groups.yahoo.com/group/AucklandFreecycle/

Reply via email to