Didn't getting any mail while it is saying Email set successfully

	 $update_tracking=mysqli_query($con,"Update ".PREFIX."payments SET tracking_number='".$track_num."', shipping_medium='".$courier_com."',
	  other_details='".$c_msg."', shipping_date='".date("Y-m-d H:i:s")."', is_shipped='1' where id='".$id."'");
     $subject='Order Shipped';

		$message = '



        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />




            <div id="email-wrap" >

           <p style="font-size:14px"><strong>Dear Customer,</strong><br><br>Tracking Number:'.$track_num.'<br><br><p>'.$c_msg.'</p>';

		$message .= '<br><br><span>Track your order:-</span><a href="'.$track_link.'">'.$track_link.'</a>';

        $message .='</p><br><br>Thanks..</div>



$headers= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=U7F-8' . "\r\n";
$headers .= 'From: <info@test.com>' . "\r\n";

	echo '<script>alert("Email Send Successfully!!!")</script>';
	echo '<script>alert("Something Wrong!!!")</script>';


Check the log of your MTA and eMail client. Debug them while sending.

I did this but no luck.
Is this server side issue?

If you’re actually sending out email as @test.com, your host might be refusing to send it because you dont own test.com. I’d personally avoid using the default mail command and use something more featured like PHPMailer.

Also verify that your web host allows server based mail sending, rather than requiring an external mail handler.


Typo here?

$headers .= 'Content-type: text/html; charset=U7F-8' . "\r\n";

UTF-8, perhaps?


Use an email from the domain you’re running the script from. For example, if it was running on mysite.com, it would be something like webmaster@mysite.com.

Also worth noting… the mail() function returns true when the message was accepted for delivery, not when it was actually sent successfully. See the Return Values section at


Depending on how sendmail is configured for PHP on your host, this is almost always going to return true.

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