473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

issue with mailformat.html and some web sites.

I am trying to create a send html functionality in a windows UI
application. And using c# (of course) and the System.Web.Mail objects
some sites work (aka www.microsoft.com) and some sites do not work
(www.slickdeals.net) is there a reason? what would cause this to
happen. I took the code that looks something like this..

MailMessage mail = new MailMessage();
mail.To = "me@mycompany.com";
mail.From = "yo*@yourcompany.com";
mail.Subject = "this is a test email.";
string url = "http://www.microsoft.com";
mail.Body = HttpContent( url );
mail.BodyFormat = MailFormat.Html;
mail.UrlContentBase = url;
SmtpMail.SmtpServer = "localhost"; //your real server goes here
SmtpMail.Send( mail );

And the error I get is
System.Web.HttpException: Could not access 'CDO.Message' object. --->
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. --->
System.Runtime.InteropServices.COMException (0x80040212): The transport
lost its connection to the server.

Any thoughts?

Nov 16 '05 #1
0 1917

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

81
by: sinister | last post by:
I wanted to spiff up my overly spartan homepage, and started using some CSS templates I found on a couple of weblogs. It looks fine in my browser (IE 6.0), but it doesn't print right. I tested...
5
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it...
1
by: Neil Guyette | last post by:
Hi, All, I'm trying to take an xmldocument and output it to html (email). Everything seems to work when I capture the XmlDocument to a StringWriter and past that to the Mail objects body. When...
1
by: mg | last post by:
I'd like to send a single e-mail message message that uses the escape character \n as well as the html tag <i> in the body How can I combine the two parts of this merssage message.BodyFormat =...
4
by: Aren Cambre | last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's BodyFormat = MailFormat.Html? I've searched all over the place and cannot find a solution anywhere. I am running this on Windows XP...
2
by: tma | last post by:
It appears that even though my mailmessage.bodyformat is set to mailformat.html, my html is being stripped out of the .body string in the code below. Anyone have any thoughts on why this happens? ...
2
by: Mart | last post by:
hi, urgent assistance needed I have been developing some webforms in VB.NET that have email submissions. I developed them locally using VS .NET 2003 on XP Prof. Then tested them on our...
2
by: Ryan | last post by:
Hi, I receive an access denied error (see below) when attempting to send an email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same code works fine in a console...
3
by: bluedogsd | last post by:
I have a new server RHE4 and I am having an issue I have never had before and it's kind of urgent. Running Apache 2.0 I need the web server to have writable access and getting denied - I'm pretty...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.