?
Solved

PHP Mailer Error

Posted on 2008-10-14
5
Medium Priority
?
361 Views
Last Modified: 2013-12-13
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

0
Comment
Question by:Neil2526
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:codezp
ID: 22715319
Do you have SMTP server installed? to use mail() you need smtp server.

Make sure info@drayerpt.com exists otherwise it will reject it.
0
 

Author Comment

by:Neil2526
ID: 22715380
info@drayerpt.com was not working, so i changed it to my valid email address.

i am still getting that error.

0
 
LVL 4

Expert Comment

by:codezp
ID: 22715446
you have smtp server setup?

try doing telnet smtp.server  25

see if that connects
0
 

Author Comment

by:Neil2526
ID: 22715527
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.
0
 
LVL 4

Accepted Solution

by:
codezp earned 1500 total points
ID: 22715542
try same with port 587? does it work?

once you fix smtp your form should work fine.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question