473,774 Members | 2,275 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converting from System.Web.Mail to System.Net.Mail

I am moving an application that involves sending email from 1.1 to 2.0. I am
attempting to convert the email-sending code from System.Web.Mail to
System.Net.Mail . I think I have most of this accomplished, but I am trying
to find the System.Net.Mail equivelant of
System.Web.Mail .MailMessage.Bo dyFormat. In the past, I used code such as the
following to specify whether the message was html or text:

mymessage.BodyF ormat = Mail.MailFormat .Html

However, I cannot find a property of the System.Net.Mail .MailMessage class
that specifies this. What do I do to specify html or text? Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Dec 12 '06 #1
5 1857
I think you're supposed to use myMessage.IsBod yHtml = true;

Nathan Sokalski wrote:
I am moving an application that involves sending email from 1.1 to 2.0. I am
attempting to convert the email-sending code from System.Web.Mail to
System.Net.Mail . I think I have most of this accomplished, but I am trying
to find the System.Net.Mail equivelant of
System.Web.Mail .MailMessage.Bo dyFormat. In the past, I used code such as the
following to specify whether the message was html or text:

mymessage.BodyF ormat = Mail.MailFormat .Html

However, I cannot find a property of the System.Net.Mail .MailMessage class
that specifies this. What do I do to specify html or text? Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Dec 12 '06 #2
I think that System.Net.Mail is going to be depreciated in 3.0, the
new syntax is going to be System.Net.Web. Net.Mail. Then a few months
after that to break all compatibility it will be changed again to
System.Net.NewM ail. Then a couple of months later it will be changed
again to System.Mail.Mai ler.NewMail, just in case anyone got used to
the old way.

If you can hang on a year or two, then you can avoid all of these
changes. As its quite likely that they will just kill the language and
bring out a new completely different one.

I heard from an insider that the next big thing is going to be called
"DNA-Universe". They decided that everything they made is shite and we
have all been doing things the wrong way - and to "unlearn everything".
The Grand Master

Nathan Sokalski wrote:
I am moving an application that involves sending email from 1.1 to 2.0. I am
attempting to convert the email-sending code from System.Web.Mail to
System.Net.Mail . I think I have most of this accomplished, but I am trying
to find the System.Net.Mail equivelant of
System.Web.Mail .MailMessage.Bo dyFormat. In the past, I used code such as the
following to specify whether the message was html or text:

mymessage.BodyF ormat = Mail.MailFormat .Html

However, I cannot find a property of the System.Net.Mail .MailMessage class
that specifies this. What do I do to specify html or text? Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Dec 12 '06 #3
Can you stop repeating these annoying posts. If you are not interested
in VB .Net, please leave the group. Why in this world you bother about
other programmers?

Master Programmer wrote:
I think that System.Net.Mail is going to be depreciated in 3.0, the
new syntax is going to be System.Net.Web. Net.Mail. Then a few months
after that to break all compatibility it will be changed again to
System.Net.NewM ail. Then a couple of months later it will be changed
again to System.Mail.Mai ler.NewMail, just in case anyone got used to
the old way.

If you can hang on a year or two, then you can avoid all of these
changes. As its quite likely that they will just kill the language and
bring out a new completely different one.

I heard from an insider that the next big thing is going to be called
"DNA-Universe". They decided that everything they made is shite and we
have all been doing things the wrong way - and to "unlearn everything".
The Grand Master

Nathan Sokalski wrote:
I am moving an application that involves sending email from 1.1 to 2.0. I am
attempting to convert the email-sending code from System.Web.Mail to
System.Net.Mail . I think I have most of this accomplished, but I am trying
to find the System.Net.Mail equivelant of
System.Web.Mail .MailMessage.Bo dyFormat. In the past, I used code such as the
following to specify whether the message was html or text:

mymessage.BodyF ormat = Mail.MailFormat .Html

However, I cannot find a property of the System.Net.Mail .MailMessage class
that specifies this. What do I do to specify html or text? Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Dec 12 '06 #4
No, I most certainly will not. I will continue for as long as I choose.
How dare you try to tell me what to do.

The Grand Master
Sugan wrote:
Can you stop repeating these annoying posts. If you are not interested
in VB .Net, please leave the group. Why in this world you bother about
other programmers?

Master Programmer wrote:
I think that System.Net.Mail is going to be depreciated in 3.0, the
new syntax is going to be System.Net.Web. Net.Mail. Then a few months
after that to break all compatibility it will be changed again to
System.Net.NewM ail. Then a couple of months later it will be changed
again to System.Mail.Mai ler.NewMail, just in case anyone got used to
the old way.

If you can hang on a year or two, then you can avoid all of these
changes. As its quite likely that they will just kill the language and
bring out a new completely different one.

I heard from an insider that the next big thing is going to be called
"DNA-Universe". They decided that everything they made is shite and we
have all been doing things the wrong way - and to "unlearn everything".
The Grand Master

Nathan Sokalski wrote:
I am moving an application that involves sending email from 1.1 to 2.0. I am
attempting to convert the email-sending code from System.Web.Mail to
System.Net.Mail . I think I have most of this accomplished, but I am trying
to find the System.Net.Mail equivelant of
System.Web.Mail .MailMessage.Bo dyFormat. In the past, I used code such as the
following to specify whether the message was html or text:
>
mymessage.BodyF ormat = Mail.MailFormat .Html
>
However, I cannot find a property of the System.Net.Mail .MailMessage class
that specifies this. What do I do to specify html or text? Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Dec 12 '06 #5
"Sugan" <vs****@gmail.c omwrote in news:1165918179 .909134.177000@
73g2000cwn.goog legroups.com:
Can you stop repeating these annoying posts. If you are not interested
in VB .Net, please leave the group. Why in this world you bother about
other programmers?
He does have a point ... Remoting is another example.
Dec 12 '06 #6

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

Similar topics

17
29836
by: mickjames | last post by:
Hi, I'd like to include the whole web page content (as opposed to just the headlines) into RSS/XML to enable people to read them via rss feed readers. Question: how to convert HTML elements such as href, img, b, p, etc into XML? I've seen someone use the following in their RSS feed but I don't like it because <pre> doesn't produce a nice format:
2
1452
by: Richard Sherratt | last post by:
The system is an Access 97 front end to a SQL Server back end. There's a whole heap of VBA code. It has its own secure workgroup MDW. It uses automation to open and modify Word, Excel, and Powerpoint documents. It uses automation to create Outlook mail items. e.g. Set objNewMail = objOutlook.CreateItem(olMailItem) With objNewMail ...
13
13510
by: Glen Richards | last post by:
Is there a way to do this. I mean there is a company who converts asm to their wsl language and then from that to c is there a way that we can do this?
5
7591
by: Mark Rae | last post by:
Hi, Can anyone please tell me how to convert an object say, a System.Web.Mail.MailMessage object, to a byte array and then convert the byte array to a Base64 string? Any assistance gratefully received. Best regards,
4
5401
by: Prabhu | last post by:
Hi, We are having problem in converting a byte array to string, The byte array has char(174), char(175), char(240), char(242) and char(247) as delimiters for the message. when we use "System.Text.Encoding.ASCII.GetString(bytearray)" of .Net library, we found that the char (delimiters) specified above are replaced with different char.
1
1956
by: Timiun | last post by:
Hey! I got a rather anoying problem here. I'm making a webmail application, that collects webmail from different POP3 servers. Fine - it works - allmost. The problem is encoding - or should I say lack of (i think) When Outlook 2003 (danish) sends email, it encodes in iso-8859-1 When my mailserver (mercury/32) recives the mail, all ok, but when my ASP.NET page retrives the mail from the server, it gets this (and
9
6735
by: anupamjain | last post by:
Hi, After 2 weeks of search/hit-and-trial I finally thought to revert to the group to find solution to my problem.(something I should have done much earlier) This is the deal : On a JSP page, I want to grab a URL and parse /change the HTML and send it to the JSP page. I take the URL from the user in a textbox (not the
5
6484
by: Nathan Sokalski | last post by:
I am moving an application that involves sending email from 1.1 to 2.0. I am attempting to convert the email-sending code from System.Web.Mail to System.Net.Mail. I think I have most of this accomplished, but I am trying to find the System.Net.Mail equivelant of System.Web.Mail.MailMessage.BodyFormat. In the past, I used code such as the following to specify whether the message was html or text: mymessage.BodyFormat =...
25
4394
by: Blasting Cap | last post by:
I keep getting errors that pop up when I am trying to convert an application from dotnet framework 1.1 to framework 2.0. The old project was saved in sourcesafe from Visual Studio 2003, and I have opened it in Visual Studio 2005. I've cleared up most errors, but have one that beats the heck out of me. I have a page: sales/Item.aspx that has several datagrids in it.
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.