Link to home
Start Free TrialLog in
Avatar of Neil2526
Neil2526

asked on

PHP Mailer Error

I wrote this snippit a out a year ago, and it worked fine.

Revisited this and now it doesn't work. I am getting the following error in my log:

[2008/07/09 02:43:29] [10.0.0.195] Ed Sendmail problem. Language string failed to load: from_failedinfo@drayerpt.com

Any insight?
else{
 $user_email=$row["email"];
 $pw=$row["password"];
 
 logToFile("drayer.log",$username." forgot password. Sent to: ".$user_email);
 
 $mail = new PHPMailer();
 $mail->smtpport = '25';
 $mail->From = "info@drayerpt.com";
 $mail->FromName = "Information";
 $mail->AddAddress($user_email);
 $mail->AddBCC("edmiller@drayerpt.com");
 $mail->AddReplyTo("info@drayerpt.com","Information");
 
 $mail->WordWrap = 50;
 $mail->Subject = "Drayer Physical Therapy Conference password";
 $mail->Body = "Your password is '".$pw."'.\nPlease contact edmiller@drayerpt.com if you are still having issues.";
 
 if(!$mail->Send()){
  logToFile("drayer.log",$username." Sendmail problem. " . $mail->ErrorInfo);
  echo "Message not sent!";
  exit;
 }

Open in new window

Avatar of codezp
codezp

Do you have SMTP server installed? to use mail() you need smtp server.

Make sure info@drayerpt.com exists otherwise it will reject it.
Avatar of Neil2526

ASKER

info@drayerpt.com was not working, so i changed it to my valid email address.

i am still getting that error.

you have smtp server setup?

try doing telnet smtp.server  25

see if that connects
doesn't look like it's connecting:

[root@localhost drayer]# telnet smtp.drayerconference 25
smtp.drayerconference/25: Temporary failure in name resolution


This is odd, I mail was workingfine last year.
ASKER CERTIFIED SOLUTION
Avatar of codezp
codezp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial