以下代码在localhost中工作正常但在Godaddy中服务器(c-panel)收件人没有收到任何邮件
require_once('PHPMailer-master/PHPMailerAutoload.php');
$mail = new PHPMailer;
$mail->SMTPDebug = 2; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP
// servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'testingpavanbrill@gmail.com'; // SMTP username
$mail->Password = '*********'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, ssl` also accepted
$mail->Port = 587; // TCP port to connect to
$mail->setFrom('dontreply@socialmedia.com', 'Social Media');
$mail->addAddress($email); // Add a recipient
$mail->addReplyTo('socialmedia@socialmedia.com', 'Social Media');
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = $subject;
$mail->Body = $message;
$mail->AltBody = $message;
$mail->Send();