Email problem

For some reason on the HTML email I am sending is working perfectly but it is not recognising the external links

<link rel='stylesheet' href='http://www.reitsgroupllc.com/style.css' type='text/css'> - the emal content does not follow the css standards set for it

<input class='btn' onMouseOver=this.className='btn btnhov' onMouseOut=this.className='btn' type='button' value='download' onClick=window.location='http://www.reitsgroupllc.com/download.php?file=$prod_file'>

- the download button is not working as it is trying to invoke an external link

The code is as under

$to  = $billing_email . ", " ;
$subject = "REITS Group LLC - Order Confirmation";
$mssg = <<< EOM
<html>
<head>
<link rel='stylesheet' href='http://www.reitsgroupllc.com/style.css' type='text/css'>
</head>
<body>
<table width="700" border="0" cellspacing="0" cellpadding="1">
<tr>
<td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="4%" bgcolor="#990000" class="whitebold">&nbsp;</td>
<td bgcolor="#CC0000" class="whitebold">Order Summary</td>
</tr>
<tr bgcolor="#EBEBEB">
<td bgcolor="#E2E2E2">&nbsp;</td>
<td valign="top" bgcolor="#EBEBEB">
<table width='100%' border='0' cellspacing='0' cellpadding='10'>
<tr>
<td bgcolor='#DBE1FC' class=text>Thank you for your order! </strong><br><br>
<strong>Transaction Number: </strong>$order_id<br>
<strong>Transaction Date:</strong> $order_date<br>
<strong>Amount Charged:</strong> $ $total_amt<br>
<strong>Credit Card:</strong> Visa (ending in 6488)<br>
</td>
</tr>
<tr>
<td bgcolor='#DBE1FC'>
<table width='100%' border='0' cellspacing='0' cellpadding='2'>
<tr>
<td bgcolor='#999999'>
<table width='100%' border='0' cellpadding='6' cellspacing='1' bgcolor='#FFFFFF'>
<tr bgcolor='#FFFFFF'>
<td align='center' class=text>Product</td>
<td width='15%' align='center'></td>
<td width='11%' align='center' class=text>Quantity</td>
<td width='12%' align='center' class=text>Subtotal</td>
</tr>
EOM;

while ($row = mysql_fetch_row($presult))     {
$cart_id=$row[0];
$prod_id=$row[1];
$cart_qty=$row[2];
$prod_name=$row[3];
$prod_nmprice=$row[4];
$cat_id=$row[5];
$prod_file=$row[6];
$prod_nmprice = $prod_nmprice * $cart_qty;
$prod_nmprice = number_format($prod_nmprice, 2);
$total += $prod_nmprice;
$total = number_format($total, 2);
$isql="INSERT INTO items (order_id,prod_id,prod_name,prod_qty,prod_price) VALUES ( '$order_id','$prod_id','$prod_name','$cart_qty','$prod_nmprice')";
$iresult = mysql_query($isql);


$mssg .= <<< EOM
<tr bgcolor='#EBEBEB'>
<td class=text><strong>$prod_name</strong></td>
<td align='center'><input class='btn' onMouseOver=this.className='btn btnhov' onMouseOut=this.className='btn' type='button' value='download' onClick=window.location='http://www.reitsgroupllc.com/download.php?file=$prod_file'></td>
<td align='center' class=text>$cart_qty</td>
<td align='center' class=text>$ $prod_nmprice</td>
</tr>
EOM;
}

$mssg .= <<< EOM
<tr bgcolor='#FFFFFF'>
<td colspan='3' align='right'> <strong>ORDER TOTAL:</strong></td>
<td align='center'>$ $total</td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr bgcolor="#CCCCCC">
<td nowrap class="text"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
EOM;

$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

$headers .= "From: orders@reitsgroupllc.com\r\n";
$headers .= "Reply-To: orders@reitsgroupllc.com\r\n";

mail($to, $subject, $mssg, $headers);
}
sulenthoAsked:
Who is Participating?
 
BogoJokerCommented:
I don't know why that is, maybe your email client?

Check out this link:
http://www.campaignmonitor.com/blog/archives/2006/03/a_guide_to_css_1.html

It says: <style></style> works in yahoo and windows live but not in hotmail and gmail.
The <link> does not work in ANY of them.
But <link> will work in any application link: Outlook 2003/OE, AOL 9, Lotus Notes, and Thunderbird            
0
 
BogoJokerCommented:
Not a solution but instead a suggestion:
Try including the CSS right into the html.
<style type="text/css">
/* CSS CODE HERE */
</style>

If that works then you have isolated the problem to the <link>.
Joe P
0
 
sulenthoAuthor Commented:
I included the css inisde the code but still the email generated does not obey the css does anyone know the reason why. Thanks
 
Sulen
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.