Send email with new data action allows sending an email containing information about new data in the table.
You can edit several parameters: the text and the subject of the message, the sender and recipient email addresses.
Available in the following events:
•Add page: Before record added
•Edit page: Before record updated
•Edit page: After record updated
Note: To use this action, you have to set up the Email settings. Press button on the toolbar or write the code manually.
Note: To specify which table fields to email, edit the values assigned to msg variable.
'********** Send email with new data ************
Dim tmpDict, msg, ret
msg =""
msg = msg & "Name : " & values("name") & vbcrlf
msg = msg & "Email : " & values("email") & vbcrlf
msg = msg & "Age : " & values("age") & vbcrlf
set tmpDict = CreateObject("Scripting.Dictionary")
tmpDict("to")="test@test.com"
tmpDict("subject")="New data record"
tmpDict("body")=msg
set ret=runner_mail(tmpDict)
if not ret("mailed") then
response.write ret("message")
end if
See also:
•Send an email with attachment
•Send an email to selected users
•How to email selected records as separate PDF files