This topic is locked

send email to form user

8/23/2009 5:15:22 AM
ASPRunnerPro General questions
G
guroos author

There are only 3 fields on the add form:

first

last

email
and there is no login.
Upon submission I would like the user to receive a simple static email.
The following works fine sending me an email but I cannot find the syntax to send the user an email:
dim tmpDict

set tmpDict = CreateObject("Scripting.Dictionary")

tmpDict("to")="me@me.com")

tmpDict("subject")="Sample subject"

tmpDict("body")="Hello there" & vbcrlf & "Best regards"

set ret=runner_mail(tmpDict)

if not ret("mailed") then

response.write ret("message")

end if
or:
// ** Send HTML email ****

set params = CreateObject("Scripting.Dictionary")

params("to")="test@test.com"

params("subject")="Sample subject"

params("htmlbody")="<body><html><p>Hello there</p>Best regards</body></html>"

params("charset")="UTF-8"

runner_mail(params)

J
Jane 8/24/2009

Hi,
please see my changes below:

dim tmpDict

set tmpDict = CreateObject("Scripting.Dictionary")

tmpDict("to")=values("email")

tmpDict("subject")="Sample subject"

tmpDict("body")="Hello " & values("first")& " " & values("last") & vbcrlf & "Best regards"

set ret=runner_mail(tmpDict)

if not ret("mailed") then

response.write ret("message")

end if