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 ...?
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 Redirecting
Hello everyone. Is there a way to redirect people to pages within a statement in PHP? Since there is
Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi
PHP Array quick help
I need
$_SESSION{'username'} to be like this:
if $_SESSION['username'] = "gay
foreach iterator
Hi Guys
Does the foreach loop have an inbuilt iterator ?
Any decent php formatter/beautifier/pretty printer?
Any decent php formatter/beautifier/pretty printer class/function?
I found the following whil
Help If user voted, block them
On my Prayer request site, i let users Click a button to Pray for somone that has posted a pray, i g
VAT
how should I deal with VAT?
if I have a product that costs £5.00 and VAT @ 17.5% (£0.87
trouble printing an array....
I'm having some trouble printing out an array forwards. I'm figuring out the high and low of an arra
first id from db not showing
I have a php script which displays the content of a mysql table as a html table with sorting, delete
elseif help!
OK so I'm new to the site, as well as PHP altogether (Trying my hand at managing an online RPG) and