Jump to content

Mailer problem


itwasntme

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.