Jump to content

phpMailer not working ..........


anoopd

Recommended Posts

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:

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

Link to comment
https://forums.phpfreaks.com/topic/178088-phpmailer-not-working/
Share on other sites

Hi Mikesta707,

                        Yea i tried using two address one gmail and one yahoo ... checked spam folder for yahoo .. think gmail hasnt got one .. checked multiple times and after trying it several time only i posted it here .. still not working for me:(

                   

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.