Jump to content

Recommended Posts

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 = "rose@yahoo.com";
$mail->FromName = "Yahoo";
$mail->Host = "smtp1.site.com;smtp2.site.com";  // specify main and backup server
$mail->AddAddress("reose@gmail.com", "Rekha");
$mail->AddAddress("reose@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
?>

 

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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.