how to php mailer send mail into inbox instead of spam folder? -
this question has answer here:
my php mailer coding.how solve problem?
<?php $message = "test mail"; /************************* php mail function *************************/ include('phpmailer-master/phpmailerautoload.php'); $mail = new phpmailer; $mail->ismail(); // set mailer use smtp $mail->host = 'smtp.zoho.com'; // specify main , backup smtp servers $mail->smtpauth = true; $mail->username = 'no-reply@mergosoft.com'; // smtp username $mail->password = '********'; $mail->smtpsecure = 'ssl'; $mail->port = 465; $mail->setfrom('no-reply@mergosoft.com', 'mergosoft'); $mail->addaddress('rajeshmergosoft@gmail.com','rajesh'); $mail->ishtml(true); $mail->subject = 'mergolife-admin login'; $mail->body = $message; if(!$mail->send()) { echo 'message not sent.'; echo 'mailer error: ' . $mail->errorinfo; } else { echo 'send'; } ?>
Comments
Post a Comment