This topic is locked

E-mail response

4/5/2006 3:15:19 PM
ASPRunnerPro General questions
J
Jonathan666 author

Hi,
i need help to create a auto e-mail response sent to the user (who filled the form) and one to a sales manager?
Thanks

Sergey Kornilov admin 4/6/2006

Jonathan,
if you want to send email after new record added you can do it using events.

Select Before record added event on the Events Tab, choose Send email with new data and add some code:

Function BeforeAdd(dict)

message =""

keys = dict.keys

For n = 0 To dict.Count-1

message = message & keys(n) & " : " & dict(keys(n)) & vbcrlf

Next

email="test@test.com"

email2 = dict("UserEmail")

subject="New data record"

sendmail email, subject, message

sendmail email2, subject, message

BeforeAdd = True

End Function