Showing posts with label email. Show all posts
Showing posts with label email. Show all posts

Monday, March 26, 2012

Html formatted email

Can anyone advise me on how to amend the following code to send Html formatted emails? It works perfectly in normal text format - I am a novice programmer.

<%@dotnet.itags.org.PageExplicit="true"Language="VB"Debug="True" %>

<html>

<head>

</head>

<body>

<%

Dim EMailFromAsString = Session("eMailFrom")

Dim EMailToAsString = Request.Form("txtTo")

Dim EMailSubjectAsString ="Your Report"

Dim EMailBodyAsString = Request.Form("txtNewBody")

Dim MySmtpClientAsNew System.Net.Mail.SmtpClient

MySmtpClient.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)%>

Any help appreciated

Anything and everything email and .NET related can be found at:

If you are dealing with 1.1:
http://www.systemwebmail.com

Or 2.0 framework
http://www.systemnetmail.com

Both sites have working examples, diagnostic solutions, and setup


I put together a FAQ in the FAQ Forum:HOW TO: Send using System.Net.Mail

HTH,
Ryan

Saturday, March 24, 2012

HTML Email.

Hi,

My booking system sends a HTML formated email as a recipt to the client
on completion of their booking. All is working well however it has been
pointed out to me that not all people's email clients will display the
reciept as HTML, if for instance the person has chosen to view email's as
plain text only, then the email will render as a unpleasent text. It is
crucial that the person visible see the information in the reciept presented
nicely, regardless of if there email client has been configured to show
email as HTML or plin text.

I have done a bit of research and found that I ca show either HTML of email
by altering a setting in the message headers.
My question is can I ammend the message headers directly through vb.net (or
any other dot net language) or will I have to use a third party component
for this, if so has anybody got any recomendations.

cheers

martin.System.Web.Mail.MailMessage exposes the Headers property, which will return
an IDictionary object that you can use to modify the headers.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows XP
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Alex" <alex_REMOVE_9876@.yahoo.com> wrote in message
news:ebvSd5ApDHA.2456@.TK2MSFTNGP09.phx.gbl...
> Hi,
> My booking system sends a HTML formated email as a recipt to the client
> on completion of their booking. All is working well however it has been
> pointed out to me that not all people's email clients will display the
> reciept as HTML, if for instance the person has chosen to view email's as
> plain text only, then the email will render as a unpleasent text. It is
> crucial that the person visible see the information in the reciept
presented
> nicely, regardless of if there email client has been configured to show
> email as HTML or plin text.
> I have done a bit of research and found that I ca show either HTML of
email
> by altering a setting in the message headers.
> My question is can I ammend the message headers directly through vb.net
(or
> any other dot net language) or will I have to use a third party component
> for this, if so has anybody got any recomendations.
>
> cheers
> martin.
Hi Chris,

Thanks for that advice.

However I am a little perplexed by this property.
The documentation says

Specifies the custom headers that are transmitted with the e-mail message.

but the definitions says

[Visual Basic]
Public ReadOnly Property Headers As IDictionary

so what I am wondering is how exactly I set the headers of a attributes of a
read only property.

I can't seem to find any good examples of this, do you know of any or can
you point me in the right direction.

cheers

Alex.

"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
news:OzslbcKpDHA.2612@.TK2MSFTNGP10.phx.gbl...
> System.Web.Mail.MailMessage exposes the Headers property, which will
return
> an IDictionary object that you can use to modify the headers.
> --
> Chris Jackson
> Software Engineer
> Microsoft MVP - Windows XP
> Windows XP Associate Expert
> --
> More people read the newsgroups than read my email.
> Reply to the newsgroup for a faster response.
> (Control-G using Outlook Express)
> --
> "Alex" <alex_REMOVE_9876@.yahoo.com> wrote in message
> news:ebvSd5ApDHA.2456@.TK2MSFTNGP09.phx.gbl...
> > Hi,
> > My booking system sends a HTML formated email as a recipt to the
client
> > on completion of their booking. All is working well however it has been
> > pointed out to me that not all people's email clients will display the
> > reciept as HTML, if for instance the person has chosen to view email's
as
> > plain text only, then the email will render as a unpleasent text. It is
> > crucial that the person visible see the information in the reciept
> presented
> > nicely, regardless of if there email client has been configured to show
> > email as HTML or plin text.
> > I have done a bit of research and found that I ca show either HTML of
> email
> > by altering a setting in the message headers.
> > My question is can I ammend the message headers directly through vb.net
> (or
> > any other dot net language) or will I have to use a third party componen
t
> > for this, if so has anybody got any recomendations.
> > cheers
> > martin.

Html email with embeded image-background?

Hi

I want to create an email message that has an image background embeded in the email message Itself

Not referenced to an image on the server. Any one can help please.

html email with embedded images

Hi,
I know how to send emails from the .Net environment, even html mails.
But, what is the best way to add images to the html?
A URL to an image somewhere on some server is usually blocked nowadays,
so you need to send the image as attachment. I had some success when I
used the filename (without path) of the attachment as img-src.
Is that the only way or are there better methods?
A related question: some of these images might be stored in the database
or generated "on the fly", but the MailAttachment class uses filenames.
Is there any way to attach some document *without* storing it first?
If not, can I safely delete that temporary file directly after I send the
email to the server?
Hans KestingI don't believe you can embed images into an email with the .net mail.
I also have to send out email's with embedded images that came from a
database. I basically had to write my own SMTP client to replace the built
in .net version. You can also purchase a 3rd party package that will do
this. (I couldn't since our product is resold and it would cause licencing
issues)
Unfortunally I can't send my code...they would probably fire me! But I can
offer you a few pointers on what you should do. Writing you're own SMTP
client isn't as easy as it sounds...there's a lot of standards to follow.
I strongly recommend that you use a 3rd party package...maybe this:
http://www.quiksoft.com/emdotnet/comparison.asp
"Hans Kesting" <news.2.hansdk@.spamgourmet.com> wrote in message
news:OZp%23JhRsEHA.160@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I know how to send emails from the .Net environment, even html mails.
> But, what is the best way to add images to the html?
> A URL to an image somewhere on some server is usually blocked nowadays,
> so you need to send the image as attachment. I had some success when I
> used the filename (without path) of the attachment as img-src.
> Is that the only way or are there better methods?
> A related question: some of these images might be stored in the database
> or generated "on the fly", but the MailAttachment class uses filenames.
> Is there any way to attach some document *without* storing it first?
> If not, can I safely delete that temporary file directly after I send the
> email to the server?
> Hans Kesting
>

html email with embedded images

Hi,

I know how to send emails from the .Net environment, even html mails.
But, what is the best way to add images to the html?

A URL to an image somewhere on some server is usually blocked nowadays,
so you need to send the image as attachment. I had some success when I
used the filename (without path) of the attachment as img-src.
Is that the only way or are there better methods?

A related question: some of these images might be stored in the database
or generated "on the fly", but the MailAttachment class uses filenames.
Is there any way to attach some document *without* storing it first?
If not, can I safely delete that temporary file directly after I send the
email to the server?

Hans KestingI don't believe you can embed images into an email with the .net mail.

I also have to send out email's with embedded images that came from a
database. I basically had to write my own SMTP client to replace the built
in .net version. You can also purchase a 3rd party package that will do
this. (I couldn't since our product is resold and it would cause licencing
issues)

Unfortunally I can't send my code...they would probably fire me! But I can
offer you a few pointers on what you should do. Writing you're own SMTP
client isn't as easy as it sounds...there's a lot of standards to follow.
I strongly recommend that you use a 3rd party package...maybe this:
http://www.quiksoft.com/emdotnet/comparison.asp

"Hans Kesting" <news.2.hansdk@.spamgourmet.com> wrote in message
news:OZp%23JhRsEHA.160@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I know how to send emails from the .Net environment, even html mails.
> But, what is the best way to add images to the html?
> A URL to an image somewhere on some server is usually blocked nowadays,
> so you need to send the image as attachment. I had some success when I
> used the filename (without path) of the attachment as img-src.
> Is that the only way or are there better methods?
> A related question: some of these images might be stored in the database
> or generated "on the fly", but the MailAttachment class uses filenames.
> Is there any way to attach some document *without* storing it first?
> If not, can I safely delete that temporary file directly after I send the
> email to the server?
> Hans Kesting

html email not sending properly

Is there anything wrong with this ? I can't figure out why it does not work properly. I receive the email, but when I open the email in outlook express I see the HTML and BODY tags as plain text.

Am I doing something wrong? All my other emails seem to send fine.

Thanks for any assistance.

mike123

Dim objMail As New MailMessage()
objMail.BodyFormat = MailFormat.Html
SmtpMail.Send("bob@dotnet.itags.org.hotmail.com", "admin@dotnet.itags.org.123.com", "subject", "<html><body><br><br>Username: <a href='http://www.123.com/a.aspx?userID=" & CStr(Session("id#")) & "' target='_blank'>" & CStr(Session("id")) & "</a><br><br>" & Request.Form("message") & "</body></html>")
objMail = Nothing

hello,

The way you are using the SmtpMail.Send would ignore objmail making it obsolete and useless...

try:


Dim objMail As New MailMessage()

objMail.BodyFormat = MailFormat.Html

objMail.To = "whoever@.mail.com"
objMail.From = "whoeveritsfrom@.mail.com"

objMail.Subject = "Subject Line"
objMail.Body = "<html><body>YOUR HTML HERE</BODY></HTML
SmtpMail.Send(objMail)

objMail = Nothing

Hope that helps
The version of SmtpMail.Send you are calling is only a shortcut that sends its own mail message. Under the covers, it creates a MailMessage object, fills it with the parameters you passed in, and sends it. So, it does not use the MailMessage object you created just before calling SmtpMail.Send. And, this method assumes the body type is text.

Instead, you should fill in the MailMessage object you created, and pass it into SmtpMail.Send, as follows:


Dim objMail as New MailMessage()
objMail.BodyFormat = MailFormat.Html
objMail.From = "bob@.hotmail.com"
objMail.To = "admin@.123.com"
objMail.Subject = "subject"
objMail.Body = "......"
SmtpMail.Send(objMail)

awesome, thanks!

HTML Email message background color

An HTML email message contains top/bottom logos, a couple of pictures, and some text in between. The whole message body is basically all white. How can the background color of the surrounding area of that email message be set to gray or whatever color in the recipient's view? Thanks.

for html, the background color is set in the corresponding tag. That is:

<body bgcolor="#fff">
text
</body>

the #fff can be changed out, obviously, to any color that html will recognize (i.e. 6 digit hex web colors)


Oh, and it doesn't have to be in the <body> tag necessarily, either. (e.g., could be the <head> tag)
You can write html code in mail.body:
//create the mail message MailMessage mail =new MailMessage();//set the addresses mail.From =new MailAddress("me@.mycompany.com"); mail.To.Add("you@.yourcompany.com");//set the content mail.Subject ="This is an email"; mail.Body ="<body bgcolor="#fff">text</body>"; mail.IsBodyHtml =true;//send the message SmtpClient smtp =new SmtpClient("127.0.0.1"); smtp.Send(mail);

HTML Email Help

I am trying to send an email automatically when a user has filled in a web form.

I have been using the contents of each textbox so that the email can display details of a specific order. For example, txtForename.text, which could contain "Jerry".

I have been trying many different ways to rectify the error, with now luck.

My code looks like this:

' Send Email to customer
Dim Mail As New MailMessage()
Mail.To = lblEmail.text
Mail.From = "rentals@dotnet.itags.org.OCR.com"
Mail.Subject = "Rental Details"
Mail.BodyFormat = MailFormat.Html
Mail.Body = "<h1>Rental Summary</h1><hr /><table width='100%'><tr><td colspan='2'><h2><u>Personal Details</u></h2></td></tr><tr><td></td><td></td></tr>" & _
"<tr><td width='9%'><b>Name:</b></td><td width='91%'>" & lblForename.text & lblSurname.text & "</td></tr><tr><td></td><td></td></tr><tr><td><b>Address:</b></td><td>"& lblAddress1.text &"</td>" & _
"</tr><tr><td></td><td>"& lblAddress2.text & "</td></tr><tr><td></td><td>" & lblCounty.text & "</td></tr><tr><td></td><td></td></tr><tr><td><b>Post Code:</b> </td><td>" & lblPostcode.text & "</td>" & _
"</tr><tr><td></td><td></td></tr><tr><td><b>Tel No:</b></td><td>" & lblTelNo.text & "</td></tr><tr><td></td><td></td></tr><tr><td><b>Email Address:</b> </td>" & _
"<td>" & lblEmail.text & "</td></tr><tr><td></td><td></td></tr></table><br /><table width='100%'><tr><td colspan='2'><h2><u>Purchase Information</u></h2></td>" & _
"</tr><tr><td width='10%'></td><td width='90%'></td></tr><tr><td><b>Car:</b></td><td>" & lblCarModel.text & "</td></tr><tr><td></td><td></td></tr><tr><td><b>Price:</b></td>" & _
"<td>" & lblCarPrice.text & "</td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td><b>Accessory Name:</b></td><td>" & lblAccessoryName.text & "</td></tr><tr><td><b>Price:</b></td>" & _
"<td>" & lblAccessoryPrice.text & "</td></tr><tr><td></td><td></td></tr><tr><td><b>Pickup Date:</b></td><td>" & lblCollectDate.text & "</td></tr><tr><td></td><td></td></tr><tr><td><b>Return Date:</b></td>" & _
"<td>" & lblReturnDate.text & "</td></tr></table><br />"
SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(Mail)

I have created the email in a table format as you can see. I don't think there is any errors in the email structure. However, I am getting the following error:

Server Error in '/' Application.

The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for someone@dotnet.itags.org.hotmail.com

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Runtime.InteropServices.COMException: The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for someone@dotnet.itags.org.hotmail.com

Source Error:

Line 153: "<td>" & lblReturnDate.text & "</td></tr></table><br />"
Line 154: SmtpMail.SmtpServer = "localhost"
Line 155: SmtpMail.Send(Mail)
Line 156:
Line 157: Response.Redirect("RecordProcess.aspx")


I would appreciate any help anyone could give me!

You need to pass username/pass to your SMTP or adjust the SMTP to allow your access.

There was a post yesterday with the exact syntax for passing the credentials, but basically that's all it is.


Thats great thanks for your help!

I will try it out!

Html email and embedded images.

Is it possible to embed an image in an html email without a mail component.
If so can you post an example.
Thanks
Ok now I know it is not possible without a component. Is there a freecomponent around that lets you imbed images in to html emails?

HTML Email

Hello,
I am using the system.net.mail class to send out email in HTML
format. I have a few images in the HTML page. In order to have the
images display without referencing the server, attaching the images to
the email and calling the image like - '<img src='email2.jpg'> works
fine to me (atleast in an internal network).
I keep reading in the posts that when an email is sent to
yahoo/hotmail accnt, the images does not show up. I believe, it is an
option/setup thing? Let me know if i am wrong or missing something.
I am trying to find if I can test this on a external mail server
(just to make sure it actually works). It would be great if anybody has
any pointers? I was unable to find a mail server which accepts a mail
generated programmatically. I understand it is got to do with open
relays.
Thanks,
Sam

HTML Email

How do I send HTML email with the System.Web.Mail namespace?
I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
in the body of the email, but it didn't work. MY html tags became text.
What can I do?Hi,
You need to set the
Mail.BodyFormat = MailFormat.Html
(Assuming Mail is the name of your mail object).
Best regards,
Dave Colliver.
http://www.ManchesterFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Arne" <Arne@.discussions.microsoft.com> wrote in message
news:5057523D-B7BA-4121-A9DD-3E6EBC303632@.microsoft.com...
> How do I send HTML email with the System.Web.Mail namespace?
> I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
> in the body of the email, but it didn't work. MY html tags became text.
> What can I do?
>You need to set the
>Mail.BodyFormat = MailFormat.Html
Do you know if it can handle multi-part e-mails? What I mean is ones
sent in both plain text and HTML. That way, the e-mail client being used
can display whichever it feels (or the user has specified).
Thanks.

>(Assuming Mail is the name of your mail object).
>Best regards,
>Dave Colliver.
>http://www.ManchesterFOCUS.com
>~~
>http://www.FOCUSPortals.com - Local franchises available
>
>"Arne" <Arne@.discussions.microsoft.com> wrote in message
>news:5057523D-B7BA-4121-A9DD-3E6EBC303632@.microsoft.com...
>
Alan Silver
(anything added below this line is nothing to do with me)
Yes it does.
"Alan Silver" wrote:

> Do you know if it can handle multi-part e-mails? What I mean is ones
> sent in both plain text and HTML. That way, the e-mail client being used
> can display whichever it feels (or the user has specified).
> Thanks.
>
> --
> Alan Silver
> (anything added below this line is nothing to do with me)
>
>Yes it does.
OK, maybe I should have been a bit more specific with my question!!
*How* do you do these types of e-mails? I couldn't see anything in the
SDK - which doesn't mean it's not there, just that I couldn't find it.
TIA
>"Alan Silver" wrote:
>
Alan Silver
(anything added below this line is nothing to do with me)
Mail.BodyFormat = MailFormat.Html
will send both text and HTML format in the same format.
No, the documentation will not tell you everything you need to know about
email.
"Alan Silver" wrote:

> OK, maybe I should have been a bit more specific with my question!!
> *How* do you do these types of e-mails? I couldn't see anything in the
> SDK - which doesn't mean it's not there, just that I couldn't find it.
> TIA
>
> --
> Alan Silver
> (anything added below this line is nothing to do with me)
>
>Mail.BodyFormat = MailFormat.Html
>will send both text and HTML format in the same format.
Thanks. How do I set the two body texts? I would want a plain text one
and an HTML one. AFAICS, there is only the one Body property, which
presumably uses the MailFormat property to decide how to display the
contents. I can't see how you do multi-part messages.
Thanks
>No, the documentation will not tell you everything you need to know about
>email.
>"Alan Silver" wrote:
>
Alan Silver
(anything added below this line is nothing to do with me)

HTML Email

Hello,
I am using the system.net.mail class to send out email in HTML
format. I have a few images in the HTML page. In order to have the
images display without referencing the server, attaching the images to
the email and calling the image like - '<img src='http://pics.10026.com/?src=email2.jpg'works
fine to me (atleast in an internal network).
I keep reading in the posts that when an email is sent to
yahoo/hotmail accnt, the images does not show up. I believe, it is an
option/setup thing? Let me know if i am wrong or missing something.
I am trying to find if I can test this on a external mail server
(just to make sure it actually works). It would be great if anybody has
any pointers? I was unable to find a mail server which accepts a mail
generated programmatically. I understand it is got to do with open
relays.

Thanks,
Sam

HTML Email

How do I send HTML email with the System.Web.Mail namespace?
I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
in the body of the email, but it didn't work. MY html tags became text.

What can I do?Hi,

You need to set the

Mail.BodyFormat = MailFormat.Html

(Assuming Mail is the name of your mail object).

Best regards,
Dave Colliver.
http://www.ManchesterFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available

"Arne" <Arne@.discussions.microsoft.com> wrote in message
news:5057523D-B7BA-4121-A9DD-3E6EBC303632@.microsoft.com...
> How do I send HTML email with the System.Web.Mail namespace?
> I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
> in the body of the email, but it didn't work. MY html tags became text.
> What can I do?
>You need to set the
>Mail.BodyFormat = MailFormat.Html

Do you know if it can handle multi-part e-mails? What I mean is ones
sent in both plain text and HTML. That way, the e-mail client being used
can display whichever it feels (or the user has specified).

Thanks.

>(Assuming Mail is the name of your mail object).
>Best regards,
>Dave Colliver.
>http://www.ManchesterFOCUS.com
>~~
>http://www.FOCUSPortals.com - Local franchises available
>
>"Arne" <Arne@.discussions.microsoft.com> wrote in message
>news:5057523D-B7BA-4121-A9DD-3E6EBC303632@.microsoft.com...
>> How do I send HTML email with the System.Web.Mail namespace?
>> I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
>> in the body of the email, but it didn't work. MY html tags became text.
>>
>> What can I do?

--
Alan Silver
(anything added below this line is nothing to do with me)
Yes it does.

"Alan Silver" wrote:

> >You need to set the
> >Mail.BodyFormat = MailFormat.Html
> Do you know if it can handle multi-part e-mails? What I mean is ones
> sent in both plain text and HTML. That way, the e-mail client being used
> can display whichever it feels (or the user has specified).
> Thanks.
> >(Assuming Mail is the name of your mail object).
> >Best regards,
> >Dave Colliver.
> >http://www.ManchesterFOCUS.com
> >~~
> >http://www.FOCUSPortals.com - Local franchises available
> >"Arne" <Arne@.discussions.microsoft.com> wrote in message
> >news:5057523D-B7BA-4121-A9DD-3E6EBC303632@.microsoft.com...
> >> How do I send HTML email with the System.Web.Mail namespace?
> >> I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
> >> in the body of the email, but it didn't work. MY html tags became text.
> >>
> >> What can I do?
> --
> Alan Silver
> (anything added below this line is nothing to do with me)
>Yes it does.

OK, maybe I should have been a bit more specific with my question!!

*How* do you do these types of e-mails? I couldn't see anything in the
SDK - which doesn't mean it's not there, just that I couldn't find it.

TIA

>"Alan Silver" wrote:
>> >You need to set the
>>> >Mail.BodyFormat = MailFormat.Html
>>
>> Do you know if it can handle multi-part e-mails? What I mean is ones
>> sent in both plain text and HTML. That way, the e-mail client being used
>> can display whichever it feels (or the user has specified).
>>
>> Thanks.
>>
>> >(Assuming Mail is the name of your mail object).
>>> >Best regards,
>> >Dave Colliver.
>> >http://www.ManchesterFOCUS.com
>> >~~
>> >http://www.FOCUSPortals.com - Local franchises available
>>>> >"Arne" <Arne@.discussions.microsoft.com> wrote in message
>> >news:5057523D-B7BA-4121-A9DD-3E6EBC303632@.microsoft.com...
>> >> How do I send HTML email with the System.Web.Mail namespace?
>> >> I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
>> >> in the body of the email, but it didn't work. MY html tags became text.
>> >>
>> >> What can I do?
>>>>
>> --
>> Alan Silver
>> (anything added below this line is nothing to do with me)
>
--
Alan Silver
(anything added below this line is nothing to do with me)
Mail.BodyFormat = MailFormat.Html
will send both text and HTML format in the same format.
No, the documentation will not tell you everything you need to know about
email.

"Alan Silver" wrote:

> >Yes it does.
> OK, maybe I should have been a bit more specific with my question!!
> *How* do you do these types of e-mails? I couldn't see anything in the
> SDK - which doesn't mean it's not there, just that I couldn't find it.
> TIA
> >"Alan Silver" wrote:
> >> >You need to set the
> >> >> >Mail.BodyFormat = MailFormat.Html
> >>
> >> Do you know if it can handle multi-part e-mails? What I mean is ones
> >> sent in both plain text and HTML. That way, the e-mail client being used
> >> can display whichever it feels (or the user has specified).
> >>
> >> Thanks.
> >>
> >> >(Assuming Mail is the name of your mail object).
> >> >> >Best regards,
> >> >Dave Colliver.
> >> >http://www.ManchesterFOCUS.com
> >> >~~
> >> >http://www.FOCUSPortals.com - Local franchises available
> >> >> >> >"Arne" <Arne@.discussions.microsoft.com> wrote in message
> >> >news:5057523D-B7BA-4121-A9DD-3E6EBC303632@.microsoft.com...
> >> >> How do I send HTML email with the System.Web.Mail namespace?
> >> >> I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
> >> >> in the body of the email, but it didn't work. MY html tags became text.
> >> >>
> >> >> What can I do?
> >> >> >>
> >> --
> >> Alan Silver
> >> (anything added below this line is nothing to do with me)
> >>
> --
> Alan Silver
> (anything added below this line is nothing to do with me)
>Mail.BodyFormat = MailFormat.Html
>will send both text and HTML format in the same format.

Thanks. How do I set the two body texts? I would want a plain text one
and an HTML one. AFAICS, there is only the one Body property, which
presumably uses the MailFormat property to decide how to display the
contents. I can't see how you do multi-part messages.

Thanks

>No, the documentation will not tell you everything you need to know about
>email.
>"Alan Silver" wrote:
>> >Yes it does.
>>
>> OK, maybe I should have been a bit more specific with my question!!
>>
>> *How* do you do these types of e-mails? I couldn't see anything in the
>> SDK - which doesn't mean it's not there, just that I couldn't find it.
>>
>> TIA
>>
>> >"Alan Silver" wrote:
>>> >> >You need to set the
>> >>> >> >Mail.BodyFormat = MailFormat.Html
>> >>
>> >> Do you know if it can handle multi-part e-mails? What I mean is ones
>> >> sent in both plain text and HTML. That way, the e-mail client being used
>> >> can display whichever it feels (or the user has specified).
>> >>
>> >> Thanks.
>> >>
>> >> >(Assuming Mail is the name of your mail object).
>> >>> >> >Best regards,
>> >> >Dave Colliver.
>> >> >http://www.ManchesterFOCUS.com
>> >> >~~
>> >> >http://www.FOCUSPortals.com - Local franchises available
>> >>> >>> >> >"Arne" <Arne@.discussions.microsoft.com> wrote in message
>> >> >news:5057523D-B7BA-4121-A9DD-3E6EBC303632@.microsoft.com...
>> >> >> How do I send HTML email with the System.Web.Mail namespace?
>> >> >> I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
>> >> >> in the body of the email, but it didn't work. MY html tags became text.
>> >> >>
>> >> >> What can I do?
>> >>> >>> >>
>> >> --
>> >> Alan Silver
>> >> (anything added below this line is nothing to do with me)
>> >>
>>
>> --
>> Alan Silver
>> (anything added below this line is nothing to do with me)
>
--
Alan Silver
(anything added below this line is nothing to do with me)
thanks everyone for the replies.

"Alan Silver" wrote:

Quote:

Originally Posted by

Quote:

Originally Posted by

Mail.BodyFormat = MailFormat.Html
will send both text and HTML format in the same format.


Thanks. How do I set the two body texts? I would want a plain text one
and an HTML one. AFAICS, there is only the one Body property, which
presumably uses the MailFormat property to decide how to display the
contents. I can't see how you do multi-part messages.
Thanks
>

Quote:

Originally Posted by

No, the documentation will not tell you everything you need to know about
email.

"Alan Silver" wrote:

Quote:

Originally Posted by

Yes it does.
OK, maybe I should have been a bit more specific with my question!!
*How* do you do these types of e-mails? I couldn't see anything in the
SDK - which doesn't mean it's not there, just that I couldn't find it.
TIA
"Alan Silver" wrote:

You need to set the

Mail.BodyFormat = MailFormat.Html
Do you know if it can handle multi-part e-mails? What I mean is ones
sent in both plain text and HTML. That way, the e-mail client being used
can display whichever it feels (or the user has specified).
Thanks.
(Assuming Mail is the name of your mail object).

Best regards,
Dave Colliver.
http://www.ManchesterFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available

"Arne" <Arne@.discussions.microsoft.comwrote in message
news:5057523D-B7BA-4121-A9DD-3E6EBC303632@.microsoft.com...
How do I send HTML email with the System.Web.Mail namespace?
I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
in the body of the email, but it didn't work. MY html tags became text.
What can I do?

--
Alan Silver
(anything added below this line is nothing to do with me)
>
--
Alan Silver
(anything added below this line is nothing to do with me)
>


--
Alan Silver
(anything added below this line is nothing to do with me)
>


html editing control

Hi all, can anyone recommend a good html editing control for asp.net? Kind
of like the ones web email sites have on their compose page e.g. hotmail,
yahoo etc.
TIA!Someone posted this link a while ago:
http://www.freetextbox.com/
<param@.community.nospam> wrote in message
news:%231$AzQYtFHA.3596@.TK2MSFTNGP15.phx.gbl...
> Hi all, can anyone recommend a good html editing control for asp.net? Kind
> of like the ones web email sites have on their compose page e.g. hotmail,
> yahoo etc.
> TIA!
>
If you are willing to pay a few bucks, there is one from cutesoft.net.
Here's a link to their online demo:
http://www.cutesoft.net/example/general.aspx
-HTH
<param@.community.nospam> wrote in message
news:%231$AzQYtFHA.3596@.TK2MSFTNGP15.phx.gbl...
> Hi all, can anyone recommend a good html editing control for asp.net? Kind
> of like the ones web email sites have on their compose page e.g. hotmail,
> yahoo etc.
> TIA!
>
Are these 100% javascript? Or do they work only in IE?
TIA!
"Jeremy S." <A@.B.com> wrote in message
news:eN%23OgoYtFHA.2792@.tk2msftngp13.phx.gbl...
> If you are willing to pay a few bucks, there is one from cutesoft.net.
> Here's a link to their online demo:
> http://www.cutesoft.net/example/general.aspx
> -HTH
>
> <param@.community.nospam> wrote in message
> news:%231$AzQYtFHA.3596@.TK2MSFTNGP15.phx.gbl...
>
They spell it out all on the site. www.cutesoft.net
<param@.community.nospam> wrote in message
news:%23gSL%239htFHA.3452@.TK2MSFTNGP14.phx.gbl...
> Are these 100% javascript? Or do they work only in IE?
> TIA!
> "Jeremy S." <A@.B.com> wrote in message
> news:eN%23OgoYtFHA.2792@.tk2msftngp13.phx.gbl...
>
Hi Param,
I also think FreeTextBox is a good candidate and I've ever used it in some
web programs. Also, it's not only popular in ASP/ASP.NET app, also has JAVA
version, so I think it's browser compatibility should be ok. In addition, I
think you can also have a look at the www.asp.net or sourceforge site to
see whether there're any other good DTHML edit.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
| From: "Jeremy S." <A@.B.com>
| References: <#1$AzQYtFHA.3596@.TK2MSFTNGP15.phx.gbl>
<eN#OgoYtFHA.2792@.tk2msftngp13.phx.gbl>
<#gSL#9htFHA.3452@.TK2MSFTNGP14.phx.gbl>
| Subject: Re: html editing control
| Date: Sat, 10 Sep 2005 09:03:06 -0700
| Lines: 36
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| X-RFC2646: Format=Flowed; Response
| Message-ID: <ucQogEitFHA.1568@.TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 68-190-197-212.dhcp.rvsd.ca.charter.com 68.190.197.212
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:123685
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| They spell it out all on the site. www.cutesoft.net
|
|
|
|
| <param@.community.nospam> wrote in message
| news:%23gSL%239htFHA.3452@.TK2MSFTNGP14.phx.gbl...
| > Are these 100% javascript? Or do they work only in IE?
| >
| > TIA!
| >
| > "Jeremy S." <A@.B.com> wrote in message
| > news:eN%23OgoYtFHA.2792@.tk2msftngp13.phx.gbl...
| >> If you are willing to pay a few bucks, there is one from cutesoft.net.
| >>
| >> Here's a link to their online demo:
| >> http://www.cutesoft.net/example/general.aspx
| >>
| >> -HTH
| >>
| >>
| >>
| >> <param@.community.nospam> wrote in message
| >> news:%231$AzQYtFHA.3596@.TK2MSFTNGP15.phx.gbl...
| >>> Hi all, can anyone recommend a good html editing control for asp.net?
| >>> Kind of like the ones web email sites have on their compose page e.g.
| >>> hotmail, yahoo etc.
| >>>
| >>> TIA!
| >>>
| >>
| >>
| >
| >
|
|
|
Steven Cheng[MSFT] wrote:
> Hi Param,
> I also think FreeTextBox is a good candidate and I've ever used it in
> some web programs. Also, it's not only popular in ASP/ASP.NET app,
> also has JAVA version, so I think it's browser compatibility should
> be ok. In addition, I think you can also have a look at the
> www.asp.net or sourceforge site to see whether there're any other
> good DTHML edit.
>
I would also definitely check out r.a.d.editor from telerik.
http://www.telerik.com
They're controls kick butt and their support is top-shelf.
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com
FrontPage add-ins for FrontPage 2000 - 2003

html editing control

Hi all, can anyone recommend a good html editing control for asp.net? Kind
of like the ones web email sites have on their compose page e.g. hotmail,
yahoo etc.

TIA!Someone posted this link a while ago:
http://www.freetextbox.com/

<param@.community.nospam> wrote in message
news:%231$AzQYtFHA.3596@.TK2MSFTNGP15.phx.gbl...
> Hi all, can anyone recommend a good html editing control for asp.net? Kind
> of like the ones web email sites have on their compose page e.g. hotmail,
> yahoo etc.
> TIA!
If you are willing to pay a few bucks, there is one from cutesoft.net.

Here's a link to their online demo:
http://www.cutesoft.net/example/general.aspx

-HTH

<param@.community.nospam> wrote in message
news:%231$AzQYtFHA.3596@.TK2MSFTNGP15.phx.gbl...
> Hi all, can anyone recommend a good html editing control for asp.net? Kind
> of like the ones web email sites have on their compose page e.g. hotmail,
> yahoo etc.
> TIA!
Are these 100% javascript? Or do they work only in IE?

TIA!

"Jeremy S." <A@.B.com> wrote in message
news:eN%23OgoYtFHA.2792@.tk2msftngp13.phx.gbl...
> If you are willing to pay a few bucks, there is one from cutesoft.net.
> Here's a link to their online demo:
> http://www.cutesoft.net/example/general.aspx
> -HTH
>
> <param@.community.nospam> wrote in message
> news:%231$AzQYtFHA.3596@.TK2MSFTNGP15.phx.gbl...
>> Hi all, can anyone recommend a good html editing control for asp.net?
>> Kind of like the ones web email sites have on their compose page e.g.
>> hotmail, yahoo etc.
>>
>> TIA!
>>
They spell it out all on the site. www.cutesoft.net

<param@.community.nospam> wrote in message
news:%23gSL%239htFHA.3452@.TK2MSFTNGP14.phx.gbl...
> Are these 100% javascript? Or do they work only in IE?
> TIA!
> "Jeremy S." <A@.B.com> wrote in message
> news:eN%23OgoYtFHA.2792@.tk2msftngp13.phx.gbl...
>> If you are willing to pay a few bucks, there is one from cutesoft.net.
>>
>> Here's a link to their online demo:
>> http://www.cutesoft.net/example/general.aspx
>>
>> -HTH
>>
>>
>>
>> <param@.community.nospam> wrote in message
>> news:%231$AzQYtFHA.3596@.TK2MSFTNGP15.phx.gbl...
>>> Hi all, can anyone recommend a good html editing control for asp.net?
>>> Kind of like the ones web email sites have on their compose page e.g.
>>> hotmail, yahoo etc.
>>>
>>> TIA!
>>>
>>
>>
Hi Param,

I also think FreeTextBox is a good candidate and I've ever used it in some
web programs. Also, it's not only popular in ASP/ASP.NET app, also has JAVA
version, so I think it's browser compatibility should be ok. In addition, I
think you can also have a look at the www.asp.net or sourceforge site to
see whether there're any other good DTHML edit.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

-------
| From: "Jeremy S." <A@.B.com>
| References: <#1$AzQYtFHA.3596@.TK2MSFTNGP15.phx.gbl>
<eN#OgoYtFHA.2792@.tk2msftngp13.phx.gbl>
<#gSL#9htFHA.3452@.TK2MSFTNGP14.phx.gbl>
| Subject: Re: html editing control
| Date: Sat, 10 Sep 2005 09:03:06 -0700
| Lines: 36
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| X-RFC2646: Format=Flowed; Response
| Message-ID: <ucQogEitFHA.1568@.TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 68-190-197-212.dhcp.rvsd.ca.charter.com 68.190.197.212
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:123685
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| They spell it out all on the site. www.cutesoft.net
|
|
|
|
| <param@.community.nospam> wrote in message
| news:%23gSL%239htFHA.3452@.TK2MSFTNGP14.phx.gbl...
| > Are these 100% javascript? Or do they work only in IE?
| >
| > TIA!
| >
| > "Jeremy S." <A@.B.com> wrote in message
| > news:eN%23OgoYtFHA.2792@.tk2msftngp13.phx.gbl...
| >> If you are willing to pay a few bucks, there is one from cutesoft.net.
| >>
| >> Here's a link to their online demo:
| >> http://www.cutesoft.net/example/general.aspx
| >>
| >> -HTH
| >>
| >>
| >>
| >> <param@.community.nospam> wrote in message
| >> news:%231$AzQYtFHA.3596@.TK2MSFTNGP15.phx.gbl...
| >>> Hi all, can anyone recommend a good html editing control for asp.net?
| >>> Kind of like the ones web email sites have on their compose page e.g.
| >>> hotmail, yahoo etc.
| >>>
| >>> TIA!
| >>>
| >>
| >>
| >
| >
|
|
|
Steven Cheng[MSFT] wrote:
> Hi Param,
> I also think FreeTextBox is a good candidate and I've ever used it in
> some web programs. Also, it's not only popular in ASP/ASP.NET app,
> also has JAVA version, so I think it's browser compatibility should
> be ok. In addition, I think you can also have a look at the
> www.asp.net or sourceforge site to see whether there're any other
> good DTHML edit.

I would also definitely check out r.a.d.editor from telerik.

http://www.telerik.com

They're controls kick butt and their support is top-shelf.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003

Wednesday, March 21, 2012

HTML Body

Hello,
I am sending an email in HTML format.
How can I make the body text to be Arial and 12 px size?
Thank You,
Migueluse style or stylesheet.
if client is browser based (yahoo/hotmail) it may break some of the UI.
alternatively you can use style attribute for each of your HTML
elements.
shapper wrote:
> Hello,
> I am sending an email in HTML format.
> How can I make the body text to be Arial and 12 px size?
> Thank You,
> Miguel

HTML Body

Hello,

I am sending an email in HTML format.
How can I make the body text to be Arial and 12 px size?

Thank You,
Migueluse style or stylesheet.

if client is browser based (yahoo/hotmail) it may break some of the UI.
alternatively you can use style attribute for each of your HTML
elements.

shapper wrote:

Quote:

Originally Posted by

Hello,
>
I am sending an email in HTML format.
How can I make the body text to be Arial and 12 px size?
>
Thank You,
Miguel

HTML anchor ServerClick

I'm trying to find a simple script for hiding my email until the user
chooses to
send a message. I thought I might be able to do this with the ServerClick
event on
the HTML anchor, setting the valid url there. What happens is that some
JavaScript
code is added, and the url is replaced by call to a "__doPostBack"
function:
href="javascript:__doPostBack('MailBtn','')". All that happens when the link
is clicked
is a reload. What is this function? Somebody know a better way to do this (I
really
don't want to use a cumbersome form).
<script runat="server">
void EmailAnchor_Click(Object sender, EventArgs e)
{
MailLink.HRef = "mailto:myemail@dotnet.itags.org.mindspring.com";
}
</script>
<a id="MailLink" href="http://links.10026.com/?link=mailto:me@dotnet.itags.org.nospam.net"
OnServerClick="EmailAnchor_Click" runat="server">

HTML anchor ServerClick

I'm trying to find a simple script for hiding my email until the user
chooses to
send a message. I thought I might be able to do this with the ServerClick
event on
the HTML anchor, setting the valid url there. What happens is that some
JavaScript
code is added, and the url is replaced by call to a "__doPostBack"
function:
href="javascript:__doPostBack('MailBtn','')". All that happens when the link
is clicked
is a reload. What is this function? Somebody know a better way to do this (I
really
don't want to use a cumbersome form).

<script runat="server">
void EmailAnchor_Click(Object sender, EventArgs e)
{
MailLink.HRef = "mailto:myemail@dotnet.itags.org.mindspring.com";
}
</script
<a id="MailLink" href="http://links.10026.com/?link=mailto:me@dotnet.itags.org.nospam.net"
OnServerClick="EmailAnchor_Click" runat="server"