473,320 Members | 2,003 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,320 software developers and data experts.

Web Mail

How do you create HTML mail on a ASP page.
I tried it and got all kinds of errors:

Imports System.Web.Mail

Dim m As New System.Web.Mail.MailMessage()

With m
.From = "me@my.place"
.To = "myself$my.house"
.Subject = "My SMTP Test 2"

.BodyFormat = MailFormat.Html

.Body = "<HTML><HEAD></HEAD>" & _
"<BODY><a href='http://abstractvb.com'>Goto Abstractvb.com</a>" & _
"</BODY></HTML>"

.Priority = MailPriority.High
End With

SmtpMail.SmtpServer = "MyServerName"
SmtpMail.Send(m)
Nov 21 '05 #1
4 1004
George,
How do you create HTML mail on a ASP page.
I tried it and got all kinds of errors:

Do you have the Net framework installed?

Cor
Nov 21 '05 #2
Doesn't html work with " (double quotes) for it's arguments, so for example
if you want to write this link:
<a href="http://www.google.com">Google</a>
in a vb string you have to write it like this:
strHtml = "<a href=""http://www.google.com"">Google</a>"

hth, btw what errors do you get?

Greetz Peter

"George Medlock" <ge***********@bellsouth.net> schreef in bericht
news:eA*************@TK2MSFTNGP12.phx.gbl...
How do you create HTML mail on a ASP page.
I tried it and got all kinds of errors:

Imports System.Web.Mail

Dim m As New System.Web.Mail.MailMessage()

With m
.From = "me@my.place"
.To = "myself$my.house"
.Subject = "My SMTP Test 2"

.BodyFormat = MailFormat.Html

.Body = "<HTML><HEAD></HEAD>" & _
"<BODY><a href='http://abstractvb.com'>Goto Abstractvb.com</a>" & _
"</BODY></HTML>"

.Priority = MailPriority.High
End With

SmtpMail.SmtpServer = "MyServerName"
SmtpMail.Send(m)

Nov 21 '05 #3
"Peter Proost" <pp*****@nospam.hotmail.com> schrieb:
Doesn't html work with " (double quotes) for it's arguments


HTML will work with single quotes too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4
George,

"George Medlock" <ge***********@bellsouth.net> schrieb:
How do you create HTML mail on a ASP page.
I tried it and got all kinds of errors:


* Are you using Classic ASP or ASP.NET?

* Are you sure your Server is configured to run ASP.NET scripts?

* <URL:http://www.systemwebmail.com/> will help you to solve
CDO-related errors.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #5

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

Similar topics

0
by: Merijn Boom | last post by:
Hi there, I'm trying to create an html mail with embedded pictures in it. I run perl on Windows and Red Hat but I cannot get your module (Mail::Sender) to work. I'm just trying to run the...
6
by: DigitalRick | last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my guestbook. It had been working fine untill I upgraded to Server 2003 (I am also running Exchange 2003) all locally. I...
3
by: Phil Mc | last post by:
Hi has anyone come accross the problem.... with referance to System.Web.Mail.MailMessage and System.Web.Mail.SmtpMail THIS WORKS FINE mail=new MailMessage(); mail.From =...
3
by: RN | last post by:
I am tired of sending mail from the built-in SMTP service for so many reasons (errors are nondescriptive in the event log, it doesn't let me control which IP address it sends from, and it...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
4
by: J Huntley Palmer | last post by:
How may I setup a proper HTML mail message with embedded href links using PHP, that follows all the MIME rules? Any examples or links would be appreciated. Thanks!
2
by: clevrmnkey | last post by:
I've had nothing but trouble from the System.Net.Mail objects, but I finally need to make them work, and I can't for the life of me see what I'm doing wrong. I pared back my mail transaction to...
6
by: cover | last post by:
I'm using PHP 5 at home w/Apache & MySQL on a test system where I write through a form to a database and also send an email to people on a drop down list. Purpose for this is an electronic log at...
2
by: Ruud | last post by:
Just before leaving for a holiday my collegue modified this script. Now it won't send any body text (The data filled in on the form) and in an error condition it won't send any attachments either....
2
mikek12004
by: mikek12004 | last post by:
Before posting here I google it and saw ablut 30 pages for a solution so I pretty much excluded the obvious things. The code is <?php //now to send the mails to seller...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.