Firstly, you have some syntax errors in your code. One place you are calling $message->setBody as function and one place you use it as object property. Secondly, if have below working version for you. Last, in future - read more carefully you code and try to understand what are you doing during developing. Your code has parts that doesn't make any sense.
<?php
$html = "
<html>
<body>
<table style='margin-top:10px; width: 680px; border:0px;'>
<thead>
<tr>
<th width='80%'>Product Details</th>
<th width='20%'>Amount</th>
</tr>
</thead>
<tbody>";
while ($row = mysql_fetch_array($results2)) {
$html .= "
<tr>
<td width='80%'>{$row["product_name"]} - {$row["quantity"]} {$row["type"]}</td>
<td width='20%'>₹ {$row["subtotal"]}</td>
</tr>";
}
$html .= "
</tbody>
</table>
</body>
</html>";
$message->setBody($html, "text/html");
?>