Solved

PHP Mailer Error

Posted on 2008-10-14
5
348 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
  • 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 500 total points
ID: 22715542
try same with port 587? does it work?

once you fix smtp your form should work fine.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now