Error rendering web page sent at email.

When I send a web page as email, it arrives but it doesn't render properly.

The web page's resources are drawn left-justified with carriage returns.
For example:
The page uses Div's and CSS.
for example, getting the page ...

WebRequest m_WebRequest = System.Net.HttpWebRequest.Create(url);
WebResponse m_WebResponse = m_WebRequest.GetResponse();
m_StreamReader = new StreamReader(m_WebResponse.GetResponseStream(),System.Text.Encoding.UTF8);
HtmlBody = m_StreamReader.ReadToEnd();

then mailing it ...

MailMessage email = new MailMessage();
email.Priority = System.Web.Mail.MailPriority.Normal;
email.To = m_mailTo;
email.From = m_mailFrom;
email.Subject = m_mailSubject;
email.Body = m_mailMessage;
email.BodyFormat = System.Web.Mail.MailFormat.Html;
SmtpMail.SmtpServer = "localhost";

The page shows up; but it doesn't look very nice?
Does anyone have any ideas why the html and css markup language isn't respected?

1/19/2005 10:10:30 PM 91979 articles. 3 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 27


Similar Artilces:

redirecting user when email has been sent to a thankyou page or when the email has not been send to an error page
 Hello, I wrote this code for my email: Imports System.Net.MailPartial Class sendemail_feedbackpage    Inherits System.Web.UI.Page    Protected Sub submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submit.Click        Const ToAddress = ""        Dim MM As New MailMessage(UsersEmail.Text, ToAddress)        MM.Subject = "asp.netsubmission form"        MM.Bod...

Do not get expected WEb page on secondary
netware 6.5 sp2 Have setup a web page on a seconary IP address Load appache with the following command line LOAD ADDRESS SPACE = CSMI APACHE2 -f SYS:APACHE2\CSMI\SERVER\HTTPD.CONF Where HTTPD.CONF is set up to Listen which is a secondary ip address A display secondary ipaddress at the server lists the seconary ipaddress I can ping the secondary ip address from the client in Remote manager using IP Address management the secondary IP addresses are not listed When I attempt to brose to the HTTP:// address I do not see the web page I...

web.config error page. Page that had the error?
 I know I can set my web.config to redirect to an error page when there is an error. Is there any way to report what page had the error in the that error page? Will that always be the referring page name? Thanks for any help or information. i think you can try Server.GetLastError().InnerException I have to factor in that sometimes this will produce:   System.NullReferenceException: Object reference not set to an instance of an object. at ErrorPage.OnLoad(EventArgs e) in Any way to do that without try catch? Actually in the Error's page I never  get anything...

Putting / after any web page ends with .aspx cause errors in page render
Putting / after any web page ends with .aspx cause errors in page render, I confirm this problem by testing ASPNET_Security_Tutorial_02_CS from this site just run it and add / to the address bar and it will cause all of the page styling to go. Anyone have solution or workaround.  Thanks Yes, I know what is this issue. If we put "/" at the end, the IIS will resolve the whole URL as a folder. For example, a URL named "", if we add a "/" at the end, the IIS will resolve it as a folder, and now the CSS file(css.css) will re...

Want to get rendered page output (i.e., the HTML that is getting sent to the browser).
Ok, so that wasn't really what I wanted to do originally.  What I *really* want to do is just grab the HTML for a particular section of the page.  I discovered I could do this using the RenderControl method of the placeholder which contains all the controls I want to get HTML for. Problem is, some of those controls are form elements.  Result? {sound of screeching metal and glass breaking} Seems that .NET will refuse to render those objects unless they are inside a <form runat="server"> element, and since I'm trying to render them out by themselves, it won'...

How to get HTML Source of web page opened by web browser using
hello friends,         i have opened an web browser in using the below code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim nullObject As System.Object = 0 Dim str As String = "" Dim nullObjStr As System.Object = str Windows.Forms.Cursor.Current = Cursors.WaitCursor Dim i As Int16 For i = 1 To 2 AxWebBrowser1.Navigate("", True) AxWebBrowser1.Document. Next Windows.Forms.Cursor.Current = Cursors.Default End Sub  ...

How to get the HREF value of the Anchor tag in a web page using the web browser control in
Hi Friends,               i have a webserver control in my application.i load the web browser control on a button click using the below code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click                AxWebBrowser1.Navigate("", False) End sub once the page is loaded in the browser i want the <a> HREF value in that page.For example if that page has ...

Getting things back in Start Page and things out of Start Page
I know I posted over a year ago about this same question, I can not find my original post though. I know I posted it and I did find the solution and posted the sollution but I can not find it anywhere here again. They really need a better search engine on these forums. Is there any tools out there to help manage the start page? For example. I have projects that are on a web server I access them on the remote server. Well the start page never ever shows any updates for it the date posted as last access is the day I created it, However this is one of my more used projects. This one is so b...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

How do you email an entire web page in
Hello Everybody,  I am currently developing my first ever web site that sales products. When a user is finish with their order they will see a web page that contains their reciept information. I want to send this page to their email. In order to do this I need to know how to email an entire web page. I know how to send an email, so I am figuring it has something to do with body property of the System.Web.Mail.MailMessage object. If anyone knows how to do this please inform me. All help is appreciated. Thanks in advance. Regards, Prophet Take a look at http:/...

Help getting started developing a web page
Hi, I've developed a few websites with frontpage and I like very much how easy it is to setup the graphical aspects of the page. I am also a VB programmer with over 5 years of development experience. I have Visual Studio .NET 2003 and have done several ASP.NET Web Services and have even played around with the Web Application. Still, I am not quite sure how to start building the website. There has to be a simple tutorial out there that walks you through starting a new website. I'm hoping that there is an easier way to do this than with Studio .NET. Is there an application out there... ...

Fill in web page search box and get resulting web page via code?
Hi all, I have a web page: and I am wondering how I could simulate entering a value in the search text box, pressing search and then getting the resulting web page so I can process the information? I can process the info already if I manually get the source of the resulting web page, but not how to get the page automatically via programming. I have access to Delphi 5 and Delphi 2007 Win32 if this helps... Thanks in advance, Cheers, Paul. "The plastic veneer of civilization is easily melted in the heat of the mome...

After publishing web page
I publish a web site. I get error on this line of code (works fine on my local PC): ViewState("@User_Id") = UCase(Request.ServerVariables("LOGON_USER")).Split("\")(1) When I do like this, it works fine: ViewState("@User_Id") = "DLBTEST"   Here is my test: Dim myUser1 As String = UCase(Request.ServerVariables("LOGON_USER")).Split("\")(1)Dim myUser2 As String = UCase(Request.ServerVariables("LOGON_USER")) myUser1 = VGWPRJAmuUser2 = VECELLIOGROUP\VGWPRJA Error from event viewer: IndexOutOfRangeExce...

Error in accessing .aspx pages over the net after Web Deployment
Hi Friends! I have developed website using ASP.Net/C#. I have deploy it using Cute FTP. Our project consisting of HomePage.htm having links to other .aspx pages is not running. Even only .aspx Pages are also not running.  It shows following error as in web.config file. Server Error in '/' Application. Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browse...

Web resources about - Error rendering web page sent at email. -

Color rendering index - Wikipedia, the free encyclopedia
The color rendering index ( CRI ), sometimes called color rendition index , is a quantitative measure of the ability of a light source to reveal ...

Rendering Facebook Connect in Other Languages
Rendering Facebook Connect in Other Languages

apple cupertino rendering 3 by Shay Levanon and Amir Levanon - Flickr - Photo Sharing!

iPhone 5 Renderings Based on Leaked Parts - YouTube
This is a CAD rendering of the upcoming new iPhone 5, based upon available sources of supposed leaked parts. More information and many more renderings ...

Pop singer whose smooth rendering of country music made her a star
Patti Page offered a soothing counterpart to the revolutionary new sound of rock'n'roll.

Boston 2024 Olympic Designs & Renderings Released [PHOTOs] - BostInno
Boston's possible bid for the 2024 Summer Olympics cleared a major hurdle on Thursday night, when the United States Olympic Committee selected ...

Google Chrome/OS to use new rendering engine ‘Blink’ based on predecessor Webkit
In a surprise announcement made at the Chromium Blog today, Google announced that Chrome OS, Chrome, and Opera will use a new rendering engine ...

This is where Apple will give keynotes in a few years and a hundred other Campus 2 renderings
[ ] Related Articles Apple CFO Peter Oppenheimer sends brochure to Cupertino neighbors inviting feedback on new ‘Campus 2′ Apple ...

New renderings released of proposed NFL stadium in Inglewood
New renderings have been released of St. Louis Rams&#39; owner Stan Kroenke&#39;s proposed &#36;1.86-billion venue at the former Hollywood Park ...

Congress is great … at ducking issues, rendering itself irrelevant
According to the Associated Press, Senate Majority Leader Mitch McConnell "grudgingly" conceded this week that he and his fellow Republicans ...

Resources last updated: 1/19/2016 12:47:31 AM