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
Disable html within defined tags
I have a mysql database that allows users to enter content with html, but I also want to have a tag
Help with file_get_html
The following code gives the expected results:
<html>
<head&g
switch not getting value
what am i doing wrong?
i want to populate the country list according to the category
i want to
blank page.... nothing is happening.
I'm new to a lot of this but in the last 24hrs have learned a lot.
Installed latest version of my
Packet Design
Hi All,
Im new about network programming and I want to design a protocol but I have some question
SCRIPT ERROR
Here is the CONTACT FORM I made for our website:
<form id="form1" name="
cPanel API
Hi Guys,
Need a little guidance. I'm trying to get my script to communicate with cPanel (or W
retrieving more than one max key from an array?
so i have an array of 20 numerical values (0-100) that i need to order from highest to lowest and th
Socket Server Response Headers
Earlier I had a post about my Socket Server, I wasn't able to get it to connect, now I can
I
Cursor statement failed with errors
Following statement failed with the errors.
cursor proj_cursor1 is (select projectID from