error while using phpmailer

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rekha_harnoor
Forum Commoner
Posts: 32
Joined: Mon Feb 19, 2007 3:17 am

error while using phpmailer

Post by rekha_harnoor »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Code: Select all

<?php

require 'c:\phpmailer\class.phpmailer.php';

$mail = new PHPMailer();
$mail->Priority = '3';
$mail->From = 'rer@yahoo.com';
$mail->FromName = 'Ra';
$mail->AddAddress('hpp@yahoo.com','Hpp'); 

$mail->IsHTML(true);                               // send as HTML

$mail->Subject  =  'Here is the subject';
$mail->Body     =  'This is the test mail';

if(!$mail->Send())
{
   echo 'Message was not sent <p>';
   echo 'Mailer Error: ' . $mail->ErrorInfo;
   
}
else
{
echo 'Message has been sent';
}
$mail->ClearAddresses(); 
$mail->ClearAttachments(); 

?>
If I run this I am getting the following error

Message was not sent
Mailer Error: Language string failed to load: instantiate


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Try Swift Mailer :wink:

P.S Please use BBcode and wrap your PHP code with PHP tags. viewtopic.php?t=8815 (see #9 on the list)
Post Reply