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
how to hide input fields on selection screen using variant attribute
Hello all,
I want to know how to hide input fields on selection screen using variant attr
Program with calculate Meteorologic measurements
Hello I'm a beginner and I want to make a program with calculate Meteorologic measurements:
ba
Limiting uploaded file type
I am working on a simple upload script, and I need it to limit the allowed file type that is uploade
Undefined Variable: PHP_SELF, pls help
Hi,
Im a newbie on PHP / MySQL programming and Im running a script to search one field on my
Preg_match unknown modifyer
Hello,
Im trying to write a little script for my forums i need to get the reply from my forum
Error: SQL Syntax; Line 1
Code:
<?php require "global_settings.php"; ?>
<title&g
If a form submits back to same page do you need to use $get
IM trying to pass page number and year that was selected back to the same page.
i have this c
Question handling xml data
Hello,
I have sucessfull followed this tutorial
http://www.phpfreaks.com/tutorial/handlin
DATEDIFF Question
First time post, and of course it is a help question.
I am using a WP plug-in to display prev
Image DPI
Hi.
I allow users to upload images, the user then is able to adjust several settings for the