html - Email sending using smtp server in php -


        <body>         <form action="" method="post">         <input type ="text" name="email" value="<?php echo 'email'; ?>" />         <br>         <button  type="submit" id='delete'    value="truncate"><b>mailto</b></button>                <input type="hidden" name="submitted" value="1" />          </form>         </body>           <?php         require_once("./phpmailer_5.2.4/class.phpmailer.php");          if(isset($_post['submitted'])==1)         {           $mail=new phpmailer();         $email = $_post['email'];         echo $email;         $mail->issmtp();         $mail->smtpdebug=1;         $mail->smtpauth=true;         $mail->smtpsecure='ssl';         $mail->host='smtp.bizmail.yahoo.com';         $mail->port='465';         $mail->ishtml(true);         $mail->username='abc@xyz.com';         $mail->password='******';          $mail->subject='hello datastra';         $mail->body='this test mail xyz';         $mail->addaddress($email,$name='xyz');         if($mail->send())         {            echo 'message sent successfully';           }         else          {            echo 'mailer error'.$mail->errorinfo;          }           } 

i'm trying send email corresponding mail id i'm failing error msg

smtp -> error: mail not accepted server: 501 syntax error in arguments following address failed: root@localhost : mail not accepted server,501,syntax error in arguments  smtp server error: syntax error in arguments mailer errorthe following address failed: root@localhost : mail not accepted server,501,syntax error in arguments  smtp server error: syntax error in arguments  smtp server error: syntax error in arguments  can let me know i'm going wrong  

your error messages quite clear. need set "from" attributes

$mail->from       = "abc@xyz.com"; $mail->fromname   = "joe doe"; 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -