php - PHPmailer is not delevering email -


i trying send email using phpmailer. username , password correct , there no errors, email not deliverd. there can me out?

here's code:

$mail = new phpmailer();  $mail->smtpdebug = 2;  $mail->issmtp(); $mail->mailer = "smtp"; $mail->host = "myhost"; $mail->port = "25"; // 8025, 587 , 25 can used. use port 465 ssl. $mail->smtpauth = true; $mail->smtpsecure = 'tls'; $mail->username = "myuser"; $mail->password = "**********";  $mail->from = "from.example.com"; $mail->fromname = "fromname"; $mail->addaddress($email, "jordy ol");  $mail->subject = $subject; $mail->ishtml(true); $mail->msghtml($message); $mail->wordwrap = 50;  if(!$mail->send()) {     echo 'message not sent.';     echo 'mailer error: ' . $mail->errorinfo;     exit; } else {     $mail->errorinfo;     echo 'message has been sent.'; } 


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -