473,387 Members | 1,516 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,387 software developers and data experts.

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.BodyFormat. In the past, I used code such as the
following to specify whether the message was html or text:

mymessage.BodyFormat = 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********@hotmail.com
http://www.nathansokalski.com/
Dec 12 '06 #1
5 6471
I think you're supposed to use myMessage.IsBodyHtml = 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.BodyFormat. In the past, I used code such as the
following to specify whether the message was html or text:

mymessage.BodyFormat = 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********@hotmail.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.NewMail. Then a couple of months later it will be changed
again to System.Mail.Mailer.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.BodyFormat. In the past, I used code such as the
following to specify whether the message was html or text:

mymessage.BodyFormat = 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********@hotmail.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.NewMail. Then a couple of months later it will be changed
again to System.Mail.Mailer.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.BodyFormat. In the past, I used code such as the
following to specify whether the message was html or text:

mymessage.BodyFormat = 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********@hotmail.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.NewMail. Then a couple of months later it will be changed
again to System.Mail.Mailer.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.BodyFormat. In the past, I used code such as the
following to specify whether the message was html or text:
>
mymessage.BodyFormat = 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********@hotmail.com
http://www.nathansokalski.com/
Dec 12 '06 #5
"Sugan" <vs****@gmail.comwrote in news:1165918179.909134.177000@
73g2000cwn.googlegroups.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
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...
2
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...
13
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
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...
4
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...
1
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...
9
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...
5
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...
25
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...
1
by: Vivienne | last post by:
Hi, I am using a c# library in my c++ project. so I have to convert a basic string to System::string to make use of a function that takes System::String as argument. I did it like this: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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...

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.