Contents

 
Home
ASPRunner Professional 7.0 manual
Prev Page Next Page
 
 

Send an email with old data

 

To send an email with old data use Send email with old data record action.

Available in following events:

step11-1-8

yellowbulbNote: Change the values listed in red to match your specific needs.

'**********  Send email with old data record  ************

' do not forget to setup email parameters like From, SMTP server etc

' on 'Security->User login settings' dialog

dim tmpDict, msg, rsOld, i

set tmpDict = CreateObject("Scripting.Dictionary")

tmpDict("to")="--rbegin--test@test.com--rend--"

tmpDict("subject")="--rbegin--Sample subject--rend--"

msg=""

' modify the following SQL query to select fields you like to send

set rsOld = dal.Table(strTableName).Query(where,"")

if not rsOld.eof then

    for i=0 to rsOld.Fields.Count-1

        if not IsBinaryType(rsOld.Fields(i).Type) then _

            msg = msg & rsOld.Fields(i).Name & " : " & _

              rsOld(rsOld.Fields(i).Name) & vbcrlf

    next

end if

rsOld.Close:set rsOld = Nothing

tmpDict("body")=msg

set ret=runner_mail(tmpDict)

if not ret("mailed") then

    response.write ret("message")

end if

For more information about using Data Access Layer (DAL), see Data Access Layer.

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)