Sending mail in PHP is taking too long time

I am using mail() function to send mail to customers for their account creation.
I am sending HTML message in mail. Although the mail is being sent successfully but its taking a too long time to send, around 10-15 min.

This is my below code for sending mail in file sendmail.php.

<?php
   $to = "cool.guy.rajverma@gmail.com";
   $subject = 'Hungercart Account Created - Explore your new account now!';

$message = '
<html>
<head>
  <title>Hungercart Account Created - Explore your new account now!</title>
</head>
<body>
   <table width="600px" cellspacing="0" cellpadding="5">
      <tr>
      <td bgcolor="#330033" align="left" colspan="4">
      <img src="www.ramainfotech.co.in/hungercart/images1/logonew1_mail.png">
      </td>
      <td bgcolor="#330033" align="right" valign="top" colspan="4">
      <img src="www.ramainfotech.co.in/hungercart/images1/download-android-app.png">
      </td>
    </tr>
      <tr bgcolor="#90C" valign="middle">
      <td align="right" align="left">
      <img src="www.ramainfotech.co.in/hungercart/images1/bul2.png">
      </td>
      <td>
      <font color="#CC99FF" size="2" face="sans-serif">
      ORIGINAL PRODUCTS
      </font>
      </td>
      <td align="right">
      <img src="www.ramainfotech.co.in/hungercart/images1/bul1.png">
      </td>
      <td align="left">
      <font color="#CC99FF" size="2" face="sans-serif">
      CASH ON DELIVERY
      </font>
      </td>
      <td align="right">
      <img src="www.ramainfotech.co.in/hungercart/images1/bul3.png">
      </td>
      <td align="left">
      <font color="#CC99FF" size="2" face="sans-serif">
      FREE & EASY RETURNS
      </font>
      </td>
      <td align="right">
      <img src="www.ramainfotech.co.in/hungercart/images1/bul4.png">
      </td>
      <td align="left">
      <font color="#CC99FF" size="2" face="sans-serif">
      100% SATISFACTION GUARANTEE
      </font>
      </td>
      </tr>
      </table>
      <table width="600px" cellspacing="0" cellpadding="5" bgcolor="#f6f3f3">
      <tr>
      <td colspan="4">
      <font color="#000" size="2" face="sans-serif">
      <br><b>Dear '.$to.',</b><br><br>

Congratulations! You have successfully created a new account with Hungercart.<br><br>

Your login email ID: <font color="#0000FF">' . $to . '</font><br><br>

As a registered user you can now enjoy a personalized shopping experience, including quicker checkout and a public wishlist. While, you can now write reviews and rate products on the Hungercart site, you will need to verify your email ID for your submissions to be visible to others.<br><br>
<p align="center">
<a href="http://www.ramainfotech.co.in/hungercart/verifyemail.php?email=' . $to . '"><img src="www.ramainfotech.co.in/hungercart/images1/vmail.png"></a>
</p><br>
If a new window does not open automatically please copy the URL below and paste it in your browser to manually complete the process.<br><br>

<a href="http://www.ramainfotech.co.in/hungercart/verifyemail.php?email=' . $to . '">http://www.ramainfotech.co.in/hungercart/verifyemail.php?email=' . $to . '</a><br><br>
      </font>
      </td>
      </tr>
      <tr><td colspan="2" valign="top" width="50%">
      <font size="+2" face="sans-serif">What Next?</font><br><br>
      <font size="-2" face="sans-serif">Enjoy your shopping! Visit the My Orders page to see<br>your order history.</font>
      </td>
      <td colspan="2" valign="top" width="50%">
      <font size="+2" face="sans-serif">Any Questions?</font><br><br>
      <font size="-2" face="sans-serif">Get in touch with our 24x7 Customer Care team.</font>
      </td></tr>
      <tr align="center"><td colspan="4">
      <font size="2" face="sans-serif">www.hungerCart.com</font>
      </td></tr>
      <tr align="center"><td colspan="4">
      <img src="www.ramainfotech.co.in/hungercart/images1/mail-line.png">
      </td></tr>
      <tr align="center" valign="top"><td colspan="4">
      <font size="-2" face="sans-serif">24x7 Customer Support  |  Buyer Protection  |  Flexible Payment Options  |  Largest Collection</font><br><br>
      </td></tr>
    </table>
</body>
</html>
';
    $headers  = 'MIME-Version: 1.0' . "\r\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
	$headers .= 'From: hungercart.com <info@ramainfotech.co.in>' . "\r\n";
	$headers .= 'Cc: info@ramainfotech.co.in' . "\r\n";

   $retval = mail ($to,$subject,$message,$headers);
   if( $retval == true )
   {
      echo "Message sent successfully..";
   }
   else
   {
      echo "Message could not be sent...";
   }
?>

Can anybody guide me that why it is taking too much time for sending the mail.
Do I need to change some code ?
Your help will be highly appreciated.

Thanks & regards

It looks pretty standard to me, not tried.
Does it take 10 min to display Message sent successfully…?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.