vbscript
Main Topics
Browse All Topics
How do i generate an email automatically in response to a form (in which an email is entered) designed in dreamweaver (which goes into an Access database)
Seb
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi Seb,
One of the first things you need to do is determine what mail component your host allows you to use to send email. Assuming your pages are on a Windows system, you could use CDONTS or CDOSYS (on W2000 + server). Some hosts also have third party components installed such as JMail or ASPMail. You should be able to find this information on your host's site.
To use CDONTS, for example:
strRecipient = Request.Form.txtToEmailAdd
strMailbody="This is the email body." & "<br>" & "<br>"
strMailbody=mailbody & "Sent at " & Now() & "</font>"
'variables to send the email
Set objCDO = Server.CreateObject("Cdont
objCDO.BodyFormat =0 ' 0 is a plain text, 0 "zero" is a HTML
objCDO.MailFormat = 0 ' 1 is a plain text, 0 "zero" is mime format
objCDO.To = "strRecipient" ' put the recipient email address here
objCDO.From = "yourname@yourwebaddress.c
objCDO.Subject ="Title of the email"
objCDO.Body =mailbody
objCDO.Send
Set objCDO = Nothing
Usually I have the form insert on the page where the user enters their information, then redirect to a "Thank You" page. On the "Thank You" page, I have the code to send the mail.
HTH,
painted
If you use cdosys then use the below. I would send this after the database insert..
Dim HTML
HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">"
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<meta http-equiv=""Content-Type"
HTML = HTML & "content=""text/html; charset=iso-8859-1"">"
HTML = HTML & "<meta name=""GENERATOR"""
HTML = HTML & " content=""Microsoft Visual Studio 6.0"">"
HTML = HTML & "<title>Message from " & strForm & " form</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body>"
HTML = HTML & "<font color=#000000 size=2 face=Arial, Helvetica, sans-serif>"
HTML = HTML & "<b>Message sent from " & strForm & " form:</b>"
HTML = HTML & "<p></p>"
HTML = HTML & "<b>Message from :</b> " & strTitle & " " & strInitials & " " & strName
HTML = HTML & "<p></p>"
Set objCDOMessage = CreateObject("CDO.Message"
objCDOMessage.From = "xxxx@xxxxx.co.uk" ' the address listed as "From"
objCDOMessage.TO = "xxx@xxxxxxx.co.uk" ' insert your address "To"
' you could include bcc and cc recipients as well
objCDOMessage.CC = "xxxxxx@xxxxxx.com"
objCDOMessage.BCC = "xxxxx@xxxxxxx.net"
objCDOMessage.Subject = "Customer Enquiry Form " ' specify the subject header
objCDOMessage.HTMLBody = HTML
'now send the message
objCDOMessage.Send
'wrap things up
Set objCDOMessage = Nothing
Business Accounts
Answer for Membership
by: jay_eirePosted on 2004-12-26 at 06:37:30ID: 12903339
hi sebastiz,
what web language are you using in your site?
Thanks
Jay Eire
(<>..<>)