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 ...?

138 Like 40 Dislike
Previous php-forum Next php-forum
Other php-forum

shoping cart issues
i´ve wrote this and works when i add an item to, my cart, but when i want to add othrer item just

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand,

pageination not working right... coping images over 4 pages
Code: <?php //This code will obtain the required page number from the $_GET array. Note that

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

sendmail code suddenly not working
Hi Guys, I maintain 3 sites (including my own) I use the following code from a french webmaster that

CURL question
i am wondering if it's possible to use multi curl with login something like

login once to web

Cron Job and Output
I have php codes running under a cron job.
But everytime i output (echo) , it comes out as comple

Problem in back link
I have page where i have given javascript back link but when i click on it browser give a message

big pagination problem in php
<?php

$connect = mysql_connect("localhost", "root", "")

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