Web Mail

G

George Medlock

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 = "(e-mail address removed)"
.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)
 
P

Peter Proost

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
 
H

Herfried K. Wagner [MVP]

George,

George Medlock said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top