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='' 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='$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
<link rel='stylesheet' href='' type='text/css'>
<table width="700" border="0" cellspacing="0" cellpadding="1">
<td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<td width="4%" bgcolor="#990000" class="whitebold">&nbsp;</td>
<td bgcolor="#CC0000" class="whitebold">Order Summary</td>
<tr bgcolor="#EBEBEB">
<td bgcolor="#E2E2E2">&nbsp;</td>
<td valign="top" bgcolor="#EBEBEB">
<table width='100%' border='0' cellspacing='0' cellpadding='10'>
<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 bgcolor='#DBE1FC'>
<table width='100%' border='0' cellspacing='0' cellpadding='2'>
<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>

while ($row = mysql_fetch_row($presult))     {
$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='$prod_file'></td>
<td align='center' class=text>$cart_qty</td>
<td align='center' class=text>$ $prod_nmprice</td>

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

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

$headers .= "From:\r\n";
$headers .= "Reply-To:\r\n";

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

Check out this link:

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            
Not a solution but instead a suggestion:
Try including the CSS right into the html.
<style type="text/css">

If that works then you have isolated the problem to the <link>.
Joe P
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
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.