I added below 2 lines in php.ini.
include_path="/home/rose/phpmailer/phpmailer.inc.php"
include_path="/home/rose/phpmailer/smtp.inc.php"
If i run the below code, i got this 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
Expand|Select|Wrap|Line Numbers
- Will anybody help me to solve this problem?
- <?php
- require("phpmailer.inc.php");
- $mail = new phpmailer;
- $mail->IsSMTP(); // set mailer to use SMTP
- $mail->From = "rose@yahoo.com";
- $mail->FromName = "Yahoo";
- $mail->Host = "smtp1.site.com;smtp2.site.com"; // specify main and backup server
- $mail->AddAddress("rose@gmail.com", "BBSC");
- $mail->AddAddress("rose@rediffmail.com"); // name is optional
- $mail->AddReplyTo("rose@yahoo.com", "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
- ?>