sulentho
asked on
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"> </ td>
<td bgcolor="#CC0000" class="whitebold">Order Summary</td>
</tr>
<tr bgcolor="#EBEBEB">
<td bgcolor="#E2E2E2"> </ 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_nmpric e, 2);
$total += $prod_nmprice;
$total = number_format($total, 2);
$isql="INSERT INTO items (order_id,prod_id,prod_nam e,prod_qty ,prod_pric e) VALUES ( '$order_id','$prod_id','$p rod_name', '$cart_qty ','$prod_n mprice')";
$iresult = mysql_query($isql);
$mssg .= <<< EOM
<tr bgcolor='#EBEBEB'>
<td class=text><strong>$prod_n ame</stron g></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);
}
<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
- 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"> </
<td bgcolor="#CC0000" class="whitebold">Order Summary</td>
</tr>
<tr bgcolor="#EBEBEB">
<td bgcolor="#E2E2E2"> </
<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_nmpric
$total += $prod_nmprice;
$total = number_format($total, 2);
$isql="INSERT INTO items (order_id,prod_id,prod_nam
$iresult = mysql_query($isql);
$mssg .= <<< EOM
<tr bgcolor='#EBEBEB'>
<td class=text><strong>$prod_n
<td align='center'><input class='btn' onMouseOver=this.className
<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
$headers .= "Reply-To: orders@reitsgroupllc.com\r
mail($to, $subject, $mssg, $headers);
}
ASKER
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
Sulen
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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