O am for the first time facing an issue with phpmailer, does anyone has any idea why phpmailer is sending email as follow? it somehow not tonverting the email into html contecn i just cannot seem to figure out why this is happening
no=reply@domain.com
6:16 PM (0 minutes ago)
to me
--b1_948b9a2ff8436cf0db01abf3e30c0373
Content-Type: text/plain; charset=us-ascii
Request information form was submitted, details are given below.
Name
Email
Mobile
State
Plans
Destination
Total Travellers
Travel Within
Comments
debojit
no@email.com
451-245-7845
Georgia
Bags packed, I'm ready to go!
France
9 people
6-9 months
werwer
Regards,
company name
--b1_948b9a2ff8436cf0db01abf3e30c0373
Content-Type: text/html; charset=us-ascii
<h4>Request information form was submitted, details are given below.</h4>
<br/>
<table border="1" style="width:100%">
<tbody>
<tr>
<td><b>Name</b></td>
<td><b>Email</b></td>
<td><b>Mobile</b></td>
<td><b>State</b></td>
<td><b>Plans</b></td>
<td><b>Destination</b></td>
<td><b>Total Travellers</b></td>
<td><b>Travel Within</b></td>
<td><b>Comments</b></td>
</tr>
<tr>
<td>debojit</td>
<td>no@email.com</td>
<td>451-245-7845</td>
<td>Georgia</td>
<td>Bags packed, I'm ready to go!</td>
<td>France</td>
<td>9 people</td>
<td>6-9 months</td>
<td>werwer</td>
</tr>
</tbody>
</table>
<br/><br/>
Regards,
<br/>
company name
--b1_948b9a2ff8436cf0db01abf3e30c0373--
this is how i send mails
$mail = new Mail();
$mail->setFrom(senderemail);
$mail->addAddress(email);
$mail->addReplyTo($email);
$mail->subject($subject);
$mail->body($body);
//$mail->send();
if($mail->send()){
echo '<div class="alert alert-success" role="alert">Thanks for contacting us, we\'ll get back to you soon.</div>';
echo "<meta http-equiv='refresh' content='5;url=contact-us.php'>";
}else{
echo '<div class="alert alert-danger" role="alert">Some problem occurred, please <a href="contact-us.php">try again</a>.</div>';
echo "<meta http-equiv='refresh' content='5;url=contact-us.php'>";
}
}
I tried adding $mail->IsHTML(true); etc but nothing seems to be working, what could be possible wrong here guys?
The issue was solved by enabling smtp login details