PHPMailer Question

I am writing and testing code for a web site but I am doing all of the testing on my local computer. I am running a sample to test the funtionality of PHPMailer. When I run the sample on an actual hosted website everything goes well and the e-mail gets sent. However, when I run the sample from my local computer I get a number of warning messages but the e-mail still goes through.

There are about 40 messages regarding class.phpmailer.php and about 6 messages regarding class.smtp.php.

The messages are all the same except the line number.

The messages say:

Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in c:\program files\e-novative\WAMP\www\phpmail\sample01\class.phpmailer.php on line 30

Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in c:\program files\e-novative\WAMP\www\phpmail\sample01\class.phpmailer.php on line 36
.
.
.
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in c:\program files\e-novative\WAMP\www\phpmail\sample01\class.smtp.php on line 49

The e-mail does go through but I get all of these messages.

I need to demo my program without putting the files on a hosted site.

Can anyone offer a suggestion as to how to eliminate these messages?

Thanks,
Charlie


Below is my sample code:

<?
$email="charliebeaver@verizon.net";

require("class.phpmailer.php");
$mail = new PHPMailer();

$mail->IsSMTP(); // set mailer to use SMTP
$mail->Helo = "mail.tescor-inc.com";
$mail->Host = "mail.tescor-inc.com";  // smtp server
$mail->From = "cbeaver@tescor-inc.com";
$mail->FromName = "cbeaver";
$mail->AddAddress($email);

$mail->WordWrap = 50;        // set word wrap to 50 characters
$mail->IsHTML(true);         // set email format to HTML

$mail->Subject = "Sample E-mail";
$mail->Body    = "<p>Body in HTML!!</p>";
$mail->AltBody = "Body in Plain Text!";

if(!$mail->Send())
{
   error ("Message could not be sent".$mail->ErrorInfo);
      exit;
}
  else echo "Mail sent!";
?>

charlieb01Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RoonaanCommented:
Hi,

I guess this is because your local server is running php 5 and your remote server could be running php 4.

-r-
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ixtiCommented:
Roonaan is totally right! This is because your local server is running php 5 and your remote server could be running php 4.
You can hide them by creating (if not exist) and adding a line in .htaccess in root of your site:
php_value error_reporting 'E_ALL & ~E_NOTICE'
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.