phpMailer not working ..........
Posted on
16th Feb 2014 07:03 pm by
admin
HI,
I was playing with the phpMailer script and tried to send a smiple mail using their test script from my site ..... it said "send again" but i am not getting mail ..........
Does anybody know what could have went wrong ...?
Did you know?Explore Trending and Topic pages for more stories like this.
Code:
Code: <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
include_once('class.phpmailer.php');
$mail = new PHPMailer(); // defaults to using php "mail()"
$body = $mail->getFile('contents.html');
$body = eregi_replace("[]",'',$body);
$mail->From = "president@******.org";
$mail->FromName = "President's Address";
$mail->Subject = "PHPMailer Test Subject via mail()";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
$mail->MsgHTML($body);
$mail->AddAddress("*******@yahoo.com", "Anoop D");
$mail->AddAddress("*******@gmail.com", "Anoop D");
//$mail->AddAttachment("member.gif"); // attachment
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent again!";
}
?>Can anybody help with this ... or does my server supports only smtp ...?
No comments posted yet
Your Answer:
Login to answer
138
40
Other forums
PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f
Must be a string? Huh, what? HELP?
with the following script, I get
Fatal error: Property name must be a string in /home/content/e/
gather checkbox data from form into email
Hello all,
First, i'd like to thank everyone who responded to my previous posts regarding set
Struct/union and scope problem!
HI all , I have
Code:
in header.h
typedef struct Node Link;
/* ---------
form problem
below in the form action, i've put "test.php?w=$sw&h=$sh" but when i input the for
Is STL important?
I'm just starting programming and I've made it until the Standart Template Library. But the chapter
Writing Windows Device Drivers with C
Yes: one of the nice features of C is void*. You can put anything there and get anything out. Very
asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa
Any help with my email script?
I have an email script, I have not tested it, although someone tested it for me and said it worked f
function not returning the correct value
I have a program that needs to return a value from a function. I have an output statement inside the