I have an HTML template in a console application where I need to send emails using the template. Everything works fine except that the CSS is not being applied to the template. Although I have written the CSS on the same HTML page, it doesn't seem to work as expected.
Here is my code for the HTML template:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Mail Alert For Tenders</title>
<style media="screen" type="text/css">
/* CSS styles */
</style>
</head>
<body>
<div class="Table">
<table>
{/* Table content goes here */}
</table>
</div>
To send the mail, I am using the following code:
/* C# code for sending mail */
The emails sent by this code do not have any formatting applied to them, meaning that no CSS is rendered in the email content.