我正在使用此代码。它使我可以成功发送答复邮件,但是该地址未收到该邮件?
function sendmail($to,$subject,$message) {
$mail = new PHPMailer; // call the class
$mail->IsSMTP();
$mail->Host = 'smtp.pepipost.com'; //Hostname of the mail server
$mail->Port = 587; //Port of the SMTP like to be 25, 80, 465 or 587
$mail->SMTPAuth = true; //Whether to use SMTP authentication
$mail->Username = 'mahadev'; //Username for SMTP authentication any valid email created in your domain
$mail->Password = 'Arena@123'; //Password for SMTP authentication
$mail->AddReplyTo("info@pepisandbox.com", "Sudam Wanve"); //reply-to address
$mail->SetFrom("info@pepisandbox.com", "Sudam SMTP Mailer"); //From address of the mail
// put your while loop here like below,
$mail->Subject = "Test MAil"; //Subject od your mail
$mail->AddAddress("imranq031@gmail.com"); //To address who will receive this email
$mail->MsgHTML("<b>Hi, your first SMTP mail has been received. Great Job!.. <br/><br/>by <a href='http://asif18.com'>Asif18</a></b>"); //Put your body of the message you can place html code here
//Attach a file here if any or comment this line,
$send = $mail->Send(); //Send the mails
echo $send;
if($send){
echo '<center><h3 style="color:#009933;">Mail sent successfully</h3></center>';
}
else{
echo '<center><h3 style="color:#FF3300;">Mail error: </h3></center>'.$mail->ErrorInfo;
}
}