Print Page | Close Window

HTML response using ASPMail?

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=13007
Printed Date: 30 March 2026 at 7:46pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: HTML response using ASPMail?
Posted By: imiweb
Subject: HTML response using ASPMail?
Date 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= " mailto:blah@blah.org - 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 "", " mailto:blah@blah.org - 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




Replies:
Posted By: michael
Date 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.


-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: imiweb
Date Posted: 16 December 2004 at 8:51pm
Thanks Michael,
 
that worked a treat. much appreciated.
 
imi.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net