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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.