itwasntme Posted April 17, 2009 Share Posted April 17, 2009 keep getting Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address in F:\hshome\xaxes1\salemchurchcynthiana.org\greetings\classes\class_generic.inc.php on line 388 think it has something ot do with name mail to format not sure. here is all the mailer code 388 is the last line of text.If anyone can fix this for me it would be greatly appreciated and end my headaches. Thanks. function send_mail($mailer,$to_name,$to_email,$from_name,$from_email,$subject,$msg,$email=true) { if ($email) { if ($mailer) { $MAILER = new PHPMailer(); $MAILER->IsSMTP(); $MAILER->Host = "localhost"; $MAILER->SMTPAuth = false; $MAILER->IsHTML(false); $MAILER->From = $from_email; $MAILER->FromName = $this->char_back($this->strip_slashes($from_name)); $MAILER->AddAddress($to_email, $to_name); $MAILER->WordWrap = 1000; $MAILER->Subject = $subject; $MAILER->Body = $this->char_back($this->strip_slashes($msg)); $MAILER->Send(); } else { mail($to_email, $subject, $this->char_back($this->strip_slashes($msg)), $this->mail_headers($this->strip_slashes($this->char_back($from_name)),$from_email)); } } } Link to comment https://forums.phpfreaks.com/topic/154435-mailer-problem/ Share on other sites More sharing options...
itwasntme Posted April 17, 2009 Author Share Posted April 17, 2009 just a note it works fine on unix server. oh and the last line split to two lines when i posted it here. They should be one line. Link to comment https://forums.phpfreaks.com/topic/154435-mailer-problem/#findComment-812026 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.