phpMailer Problem!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi all,

I want to send email using SMTP Authentication with PHPMailer,
I searched more and more but I can't find anything of my problem....

///////////////////////////////////////////////////////////////////
include_once('class.phpmailer.php');
include("class.smtp.php"); // optional, gets called from within
class.phpmailer.php if not already loaded

$mail             = new PHPMailer();
$mail->IsSMTP();

$mail->Host       = "mail.xxxxxxxxxx.com";      // sets GMAIL as the SMTP
server
$mail->Port       = 80;

$mail->Username = "website@xxxxxxxxxxx";  // SMTP username
$mail->Password = "xxxxx"; // SMTP password

$mail->From       = "website@xxxxxxxxxxxxxx";
$mail->FromName   = "First Last";

$mail->Subject    = "PHPMailer Test Subject via smtp";

$mail->AltBody    = "To view the message, please use an HTML compatible
email viewer!"; // optional, comment out and test

$mail->MsgHTML("hiiii");

$mail->AddAddress("xxxxxxxxx@xxxxxxxxx", "John Doe");

//$mail->AddAttachment("images/phpmailer.gif");             // attachment

if(!$mail->Send()) {
  echo "Mailer Error: " . $mail->ErrorInfo;
} else {
  echo "Message sent!";
}

////////////////////////////////////////////////
result is nothing, no error but didn't send
then I remove Username  & password, but didn't work!...



thanks,
shahrzad khorrami

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux