Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - HTML response using ASPMail?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HTML response using ASPMail?

 Post Reply Post Reply
Author
imiweb View Drop Down
Newbie
Newbie
Avatar

Joined: 04 December 2003
Location: United Kingdom
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote imiweb Quote  Post ReplyReply Direct Link To This Post Topic: HTML response using ASPMail?
    Posted: 16 December 2004 at 10:57am

Hi there,

I'm using ASPMail and would like to know how I can send a confirmation back to the user as a formatted HTML email response to a feedback form?

Here's what I have tried so far and have managed to send myself a notification:

    <%
    Dim strBody
   
    ' This email will be sent to the user
    Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
    Mailer.FromAddress= "blah@blah.org"
    Mailer.RemoteHost = "blah.com"
    Mailer.AddRecipient "", request.form("email")
    Mailer.Subject = "Feedback Confirmation"
    Mailer.ContentType = "text/html"
    Mailer.BodyText = strBody
    Mailer.SendMail
   
    strBody = "<HTML>" & _
    "<HEAD></HEAD>" & _
    "<BODY>" & _
    " <Font Face=Arial Size=5><B>" & _
    "  This is a test Email" & _
    " </B></Font><BR>" & _
    " <H3><A href=http://www.blah.org>Click here</a>" & _
    " to go to blah.org</h3><br>" & _
    "  The feedback you gave is as follows<br><br>" & _
    "</BODY>" & _
    "</HTML>"
    
    ' This email will be sent to the webmaster or whoever else is specified
    'Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
    'Mailer.FromAddress= Request.Form("email")
    'Mailer.RemoteHost = "blah.com"
    'Mailer.AddRecipient "", "blah@blah.org"
    'Mailer.Subject = "Site Feedback"
    'Mailer.BodyText = Request.Form("Info")
    'Mailer.SendMail
    %>

Any help you can give me will be greatly appreciated.
Thanks in advance.

imi

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 16 December 2004 at 1:10pm
You did not really say what your problem is but the two lines
Mailer.BodyText = strBody
    Mailer.SendMail
should be at the end, after you contructed the body.
Back to Top
imiweb View Drop Down
Newbie
Newbie
Avatar

Joined: 04 December 2003
Location: United Kingdom
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote imiweb Quote  Post ReplyReply Direct Link To This Post Posted: 16 December 2004 at 8:51pm
Thanks Michael,
 
that worked a treat. much appreciated.
 
imi.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.