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 Like 40 Dislike
Previous forums Next forums
Other forums

TimeZoneOffset
Hello,

Please i need your help. I have a system that users can use to punch in and out. This

Where am I going wrong
Been trying to work this out for hours

I have two tables called 'Genres' and 'Films'. Genre

problem with sql querry in php script
Hello guys,

What I want to do is I want to read out a csv file and then but te conent ot the

Connection Timeout
I'm using xmii 12.0

I'm calling a transaction as a web service from a windows application

PHP mail() rejected by SMTP
I'm currently working on a newsletter application which is installed on a windows 2003 server runnin

PHP Thumbnail Creation
Ok so i use this function to create thumbnails:

Code: [Select]function createthumb($name,$fil

Help With editting and deleting form
Hallo !!

So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.pn

use an array from 1 class in a second class
I have a class that adds data to an array

Then I have a second class and I need to check if t

Xacute search within SQL results
I have a query that is pulling data, and I want to return a specific value from the results of that

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash