473,397 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

phpmailer 0.9 errors from php.ini

I downloaded phpmailer-0.9.zip.

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
  1.  
  2. Will anybody help me to solve this problem?
  3. <?php
  4. require("phpmailer.inc.php");
  5.  
  6. $mail = new phpmailer;
  7.  
  8. $mail->IsSMTP(); // set mailer to use SMTP
  9. $mail->From = "rose@yahoo.com";
  10. $mail->FromName = "Yahoo";
  11. $mail->Host = "smtp1.site.com;smtp2.site.com";  // specify main and backup server
  12. $mail->AddAddress("rose@gmail.com", "BBSC");
  13. $mail->AddAddress("rose@rediffmail.com");   // name is optional
  14. $mail->AddReplyTo("rose@yahoo.com", "Information");
  15. $mail->WordWrap = 50;    // set word wrap
  16. $mail->AddAttachment("README");  // add attachments
  17. $mail->AddAttachment("manual.html");
  18.  
  19. $mail->IsHTML(true);    // set email format to HTML
  20. $mail->Subject = "Mail sending by using PHP";
  21. $mail->Body = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.abcdefghijklmnopqrstuvwxyz";
  22. $mail->Send(); // send message
  23. ?>
  24.  
  25.  
  26.  
Jun 22 '11 #1
2 3554
Dormilich
8,658 Expert Mod 8TB
isn’t PHPMailer latest version around 4.1 now?
Jun 23 '11 #2
Hi...
Now im using PHPMailer_v2.0.4.
I export the path in php.ini.
Now i can able to send mail by using gmail account.

But i cant able to send mail by using the below codings.
I wouldnt get any error. But its not working...

Will u plz help me to fix this problem???

It is urgent....

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. include_once('/home/rekha/PHPMailer_v2.0.4/PHPMailer_v2.0.4/class.phpmailer.php');
  4.  
  5. $mail             = new PHPMailer(); // defaults to using php "mail()"
  6.  
  7. $body             = $mail->getFile('contents.html');
  8. $body             = eregi_replace("[\]",'',$body);
  9.  
  10. $mail->From       = "mail@rediffmail.com";
  11. $mail->FromName   = "Testing mail";
  12.  
  13. $mail->Subject    = "PHPMailer Test Subject via mail()";
  14.  
  15. $mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
  16.  
  17. $mail->MsgHTML($body);
  18.  
  19. $mail->AddAddress("test@gmail.com", "TESTING");
  20.  
  21. $mail->AddAttachment("images/phpmailer.gif");             // attachment
  22.  
  23. if(!$mail->Send()) {
  24.   echo "Mailer Error: " . $mail->ErrorInfo;
  25. } else {
  26.   echo "Message sent!";
  27. }
  28.  
  29. ?>
  30.  
Jun 29 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dave Smithz | last post by:
Hi There, I have developed a php application for a client that uses the excellent class.phpmailer.php. However, the client has requested that when they get back bounce back emails from people...
4
by: R. Rajesh Jeba Anbiah | last post by:
If you're working in PHP 5 and used APD, phpDocumentor, PHPMailer & ADODB, you might be knowing that these projects are not maintained and the old codes are throwing bunch of errors in higher error...
1
by: Leszek | last post by:
Hi. I have problem with phpMailer 1.73 (windows version) After copying both class.phpmailer and class.smtp and also language file phpmailer.lang-pl to my php include directory im getting this...
3
by: Leszek | last post by:
Hi. I have problem with phpMailer 1.73 (windows version) After copying both class.phpmailer and class.smtp and also language file phpmailer.lang-pl to my php include directory im getting this...
0
by: SirShurf | last post by:
Hi, I am using a phpmailer class to send some forms over the email... And the problem is, that some ppl (especially problematic for me is the buyer....) getting the email as rough data (sorce...)...
2
by: prasenjit2007 | last post by:
Hello, can u help me sending Email with attachments using the Class phpMailer. On the website I have a link to an html form in which I input the parameters with the names 1)from(textbox name)...
9
by: Lucanos | last post by:
Hi All, I am currently using PHPMailer to send out a set of emails on the execution of a PHP Script (obviously). My problem is that the PHPMailer action is returning a "true" result each time...
5
by: Gilles Ganault | last post by:
Hello To handle an occasionnal flaky ADSL connection, I updated the database that handles incoming calls to have a column that is set to NULL, and then updated to either Y or N depending on...
4
by: mukeshrasm | last post by:
Hi! I want to use phpmailer class to send mail using smtp.I have downloaded the phpmailer and then i followed it's README file where it is mentioned that "Copy class.phpmailer.php into your php.ini...
0
by: mukeshrasm | last post by:
Hi! I want to use phpmailer class to send mail using smtp.I have downloaded the phpmailer and then i followed it's README file where it is mentioned that "Copy class.phpmailer.php into your php.ini...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.