Forum Moderators: open

Message Too Old, No Replies

Styling the text with in my asp email

is is possible to use css?

         

The Cricketer

2:11 pm on Jan 22, 2004 (gmt 0)

10+ Year Member


The asp email below is delivered to the person who filled in the asp form on the previous page. Is there any way to style the email with css or similar, such as the text's font family, size etc. I need to style it all including the Request.QueryString("name")

Hope someone can help
Cheers

[code]
<%
Option Explicit

Dim objMail
Dim strSubject
Dim strBody

strSubject = "Enquiry"
strBody = "Dear " & Request.QueryString("name") & "<br><br>Thank you for your correspondence, we have just received your enquiry and will reply soon.<br><br>Regards<br><br><b>Joe Bloggs</b><br>Bloggs are us Ltd"

' First create an instance of NewMail Object
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "joebloggs@joeybloggs.com"
objMail.To = request.querystring("email")
objMail.Value("Reply-To") = "joebloggs@joeybloggs.com"
objMail.bodyformat = 0
objMail.MailFormat = 0

objMail.Subject = strSubject
objMail.Body = strBody

objMail.Send

Set objMail = Nothing
%>
[/code]

mattglet

2:24 pm on Jan 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



strBody = "<font face = ""Arial"" size = ""2"" color = ""red"">Dear " & Request.QueryString("name") & "<br><br>Thank you for your correspondence, we have just received your enquiry and will reply soon.<br><br>Regards<br><br><b>Joe Bloggs</b><br>Bloggs are us Ltd</font>"

code is not tested, but should work.

-Matt

mattglet

2:25 pm on Jan 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



one more thing:

the recipient must allow html in their email viewer.

-Matt

The Cricketer

2:41 pm on Jan 22, 2004 (gmt 0)

10+ Year Member



Thanks mattglet

I'm a bit rubbish! I thought I had tried that, maybe I didn't put the " in the right place. Anyway thanks very much.