I'm using the SSRS web service to generate HTML4.0 format reports and then I'm trying to send them with System.Net.Mail (I know SSRS has built in report scheduling, but we have a requirement to handle all scheduled processes in a central location). So, I'm generating the html files and then trying to construct the mail message something like this :
using (var sw = new StreamReader(htmlFile))
{
mail_body = sw.ReadToEnd();
}
var mail = new MailMessage
{
From = new MailAddress(mail_from),
Subject = mail_subject,
IsBodyHtml = true,
Body = mail_body
};
The only problem being that when I do this, although the html file looks fine when I open it in a browser, in Outlook it ends up horizontally squashed.
e.g. this is what my html file looks like in IE :
But after when I send the email using the method above, in Outlook it ends up looking like this :
It seems as though there's some kind of line width limit being imposed, but I'm not sure at what level this is happening.
Does anyone have any insight at all as to what might be causing this?
Thanks!