smtp - Unable to send mail to a email server -


i using phpmailer library send email through mail server domain name pixels.com .i able send emails email addresses gmail, yahoo etc.,but unable send mail email addresses belongs same server admin@pixels.com.can suggest me solution problem .do need change setting.what other possible solutions solve issue.my php code sending mail is

 <?php     require("class.phpmailer.php");      $mail = new phpmailer();  $mail->issmtp();                                      // set mailer use      smtp $mail->host = "smtp1.example.com;smtp2.example.com";  // specify main , backup server $mail->smtpauth = true;     // turn on smtp authentication $mail->username = "jswan";  // smtp username $mail->password = "secret"; // smtp password  $mail->from = "from@example.com";   $mail->fromname = "mailer";   $mail->addaddress("josh@example.net", "josh adams");    $mail->addaddress("ellen@example.com");                  // name optional     $mail->addreplyto("info@example.com", "information");       $mail->wordwrap = 50;                                 // set word wrap 50 characters            $mail->addattachment("/var/tmp/file.tar.gz");         // add attachments          $mail->addattachment("/tmp/image.jpg", "new.jpg");    // optional name          $mail->ishtml(true);                                  // set email format html         $mail->subject = "here subject";       $mail->body    = "this html message body <b>in bold!</b>";      $mail->altbody = "this body in plain text non-html mail clients";    if(!$mail->send())      {    echo "message not sent. <p>";    echo "mailer error: " . $mail->errorinfo;     exit;     }  echo "message has been sent";      ?> 

you should update phpmailer version using, code work in old versions, try exploring github page, have lot of examples there.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -