phpmailer error on from email, PHP email -


ok i've been knocking head against wall, more overall problem of send email thru php while specifying mail server...

the solution i've made furthest phpmailer. if there lightweight easy solution - please suggest it.

here's have (obviously u/p not real u/p - in code - same account gmail in outlook, settings work fine there...

im using test - because smtp settings client gave me didn't work - though i'd try knew - did work...

<?php require 'phpmailer/class.phpmailer.php';  $mail = new phpmailer(); $mail->issmtp(); $mail->smtpdebug = 2; $mail->debugoutput = 'html'; $mail->host = "smtp.gmail.com"; $mail->port = 465; $mail->smtpauth = true; $mail->username = "me@mydomain.com"; $mail->password = "mypassword"; $mail->setfrom('me@mydomain.com', 'james test'); $mail->addaddress('me@yahoo.com', 'john doe'); $mail->subject = 'phpmailer smtp test'; $mail->msghtml( 'this test' );  //send message, check errors if( !$mail -> send() ) { echo "mailer error: " . $mail->errorinfo; } else { echo "message sent!"; } ?> 

the error i'm getting

smtp -> server: client -> smtp: ehlo dev.nps.com smtp -> server: smtp -> error: ehlo not accepted server: client -> smtp: helo dev.nps.com smtp -> server: smtp -> error: helo not accepted server: client -> smtp: auth login smtp -> error: auth not accepted server: smtp -> notice: eof caught while checking if connected following address failed: me@mydomain.com : called mail() without being connected mailer error: following address failed: me@mydomain.com : called mail() without being connected 

the dev.nps.com 'fake' domain put in host file, can distinguish projects , not use 127.0.0.1 everything... it's not specified in code - i'm not sure what's going on there, error seems balk @ 'from email'... again weird because shouldn't matter

thanks -


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -