reksss Posted June 22, 2011 Share Posted June 22, 2011 Hello Friends.... I want to send mail by using PHP. I have downloaded PHPMailer for PHP5/6 from the below website. http://phpmailer.worxware.com/index.php?pg=examplebgmail I included path in my php.ini file. If i run my program, i got some errors... <?php require("phpmailer.inc.php"); $mail = new phpmailer; $mail->IsSMTP(); // set mailer to use SMTP $mail->From = "[email protected]"; $mail->FromName = "Yahoo"; $mail->Host = "smtp1.site.com;smtp2.site.com"; // specify main and backup server $mail->AddAddress("[email protected]", "Rekha"); $mail->AddAddress("[email protected]"); // name is optional $mail->AddReplyTo("[email protected]", "Information"); $mail->WordWrap = 50; // set word wrap $mail->AddAttachment("README"); // add attachments $mail->AddAttachment("manual.html"); $mail->IsHTML(true); // set email format to HTML $mail->Subject = "Mail sending by using PHP"; $mail->Body = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.abcdefghijklmnopqrstuvwxyz"; $mail->Send(); // send message ?> I got the following errors PHP Notice: Undefined variable: from in /home/rose/public_html/BBSC/phpmailer-0.9/phpmailer/phpmailer.inc.php on line 259 PHP Notice: Undefined variable: Encoding in /home/rose/public_html/BBSC/phpmailer-0.9/phpmailer/phpmailer.inc.php on line 271 PHP Fatal error: Cannot access empty property in /home/rose/public_html/BBSC/phpmailer-0.9/phpmailer/phpmailer.inc.php on line 271 I am seeking for ur help friends.... Its urgent.... Link to comment https://forums.phpfreaks.com/topic/240080-i-have-a-problem-in-using-mail/ Share on other sites More sharing options...
Philip Posted June 22, 2011 Share Posted June 22, 2011 Last modified date: 2001-05-18 IMO the code you are getting is way outdated & probably shouldn't be looked into more. Also, it is sort of lying in the fact that saying it is for PHP6 - when in fact there is no PHP6. Some alternatives... http://swiftmailer.org/ http://pear.php.net/package/Mail Link to comment https://forums.phpfreaks.com/topic/240080-i-have-a-problem-in-using-mail/#findComment-1233212 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.