shahrzad khorrami wrote:
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
I'd suggest using the Pear Mail package http://pear.php.net/package/Mail. It's easier to use and provides excellent error reporting. Turn on the debug flag
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php