i have sendnewmail function using it send mail,in mail message is send message dispaly but in gmail its not coming ,this is the code
function sendnewmail($msgnew,$emailidnew,$subjectnew){
require_once("class.phpmailer.php");
require_once("class.smtp.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "mail.domain.com"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username ="user"; // SMTP username
$mail->Password ="password"; // SMTP password
$mail->From = "abcds@gmail.com";
$mail->FromName = "name";
$mail->AddAddress($emailidnew,"sudeshna");
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = $subjectnew;
$mail->Body = $msgnew;
if(!$mail->Send()) {
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}else{
echo 'Message send ok';
}
}
$htmldetails ="Welcome to World";
$email = "abc@gmail.com";
$subject = "Sample welcome message";
sendnewmail($htmldetails,$email,$subject);