Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Smart mailer last record

Status
Not open for further replies.

Mygurutech

IS-IT--Management
Mar 24, 2008
10
NL
HI I'm using DW (dev. toolkit) incombination with Smartmailer.

The problem I have is that the insert and mail procedure not working perfectly.
This because when you want to email the Last record that has been inserted this smartmailer is inserting the last record before it insert a new record.

So the insert order should be ...
first insert a new record and than email that particular record.

now is doing email the last record and than insert a new record. what is not correct.

FIRST INSERT AND THAN EMAIL.
below you will find the coding..also the smart mailer code.

Do you know how to solved this ORDER when it should first insert than email...

Please help me out..
need to put this application live.

Thanks
Kisoen





<%
' Make an insert transaction instance
Dim ins_TblCALL: Set ins_TblCALL = new tNG_insert
ins_TblCALL.init MM_change_STRING
tNGs.addTransaction ins_TblCALL
' Register triggers
ins_TblCALL.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1")
ins_TblCALL.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "chgmail.asp")
ins_TblCALL.registerTrigger Array("AFTER", "Trigger_FileUpload", 97)
ins_TblCALL.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation)
' Add columns
ins_TblCALL.setTable "TblCALL"
ins_TblCALL.addColumn "Usrname", "STRING_TYPE", "POST", "Usrname", ""
ins_TblCALL.addColumn "Windowslogin", "STRING_TYPE", "POST", "Windowslogin", ""
ins_TblCALL.addColumn "CAT_Appz_CRG", "STRING_TYPE", "POST", "CRG", ""
ins_TblCALL.addColumn "CAT_Appz_COM", "STRING_TYPE", "POST", "COM", ""
ins_TblCALL.addColumn "UsrHostname", "STRING_TYPE", "POST", "hostname", ""
ins_TblCALL.addColumn "CAT_Appz_LMI", "STRING_TYPE", "POST", "LMI", ""
ins_TblCALL.addColumn "SRA_token", "STRING_TYPE", "POST", "SRA Token Request", ""
ins_TblCALL.addColumn "Cat_Exchangeopt", "STRING_TYPE", "POST", "Mailbox", ""
ins_TblCALL.addColumn "ADD_user", "STRING_TYPE", "POST", "userstype", ""
ins_TblCALL.addColumn "SW_LMI", "STRING_TYPE", "POST", "SWdiv", ""
ins_TblCALL.addColumn "auth_caas", "STRING_TYPE", "POST", "CAAS", ""
ins_TblCALL.addColumn "auth_webpearl", "STRING_TYPE", "POST", "Webpearl", ""
ins_TblCALL.addColumn "auth_intranet", "STRING_TYPE", "POST", "Intranet", ""
ins_TblCALL.addColumn "auth_splmm", "STRING_TYPE", "POST", "SPLMM", ""
ins_TblCALL.addColumn "auth_swap4all", "STRING_TYPE", "POST", "Swap4all", ""
ins_TblCALL.addColumn "CAT_MFauthorization", "STRING_TYPE", "POST", "autho", ""
ins_TblCALL.addColumn "Deliveryaddress", "STRING_TYPE", "POST", "hwaddres", ""
ins_TblCALL.addColumn "Cat_Displayname", "STRING_TYPE", "POST", "Displayname", ""
ins_TblCALL.addColumn "Usr_dom", "STRING_TYPE", "POST", "Domain", ""
ins_TblCALL.addColumn "EX_Internal", "CHECKBOX_YN_TYPE", "POST", "IN", ""
ins_TblCALL.addColumn "EX_External", "CHECKBOX_YN_TYPE", "POST", "External", ""
ins_TblCALL.addColumn "EX_mailserver", "STRING_TYPE", "POST", "EX_mailserver", ""
ins_TblCALL.addColumn "Domaintype", "STRING_TYPE", "POST", "Domaintype", ""
ins_TblCALL.addColumn "EX_phonenumber", "STRING_TYPE", "POST", "Mailphone", ""
ins_TblCALL.addColumn "CAT_LU", "STRING_TYPE", "POST", "Luname", ""
ins_TblCALL.addColumn "CAT_MFappz", "STRING_TYPE", "POST", "MFappz", ""
ins_TblCALL.addColumn "CAT_fileserver", "STRING_TYPE", "POST", "Servername", ""
ins_TblCALL.addColumn "Cat_Fullpath", "STRING_TYPE", "POST", "fullpath", ""
ins_TblCALL.addColumn "FS_driveH", "CHECKBOX_YN_TYPE", "POST", "Hdrive", ""
ins_TblCALL.addColumn "FS_driveP", "CHECKBOX_YN_TYPE", "POST", "Pdrive", ""
ins_TblCALL.addColumn "FS_driveG", "CHECKBOX_YN_TYPE", "POST", "Gdrive", ""
ins_TblCALL.addColumn "FS_driveS", "CHECKBOX_YN_TYPE", "POST", "Sdrive", ""
ins_TblCALL.addColumn "Cat_Distriowner", "STRING_TYPE", "POST", "distriowner", ""
ins_TblCALL.addColumn "Cat_Distriname", "STRING_TYPE", "POST", "distriname", ""
ins_TblCALL.addColumn "Cat_Groupname", "STRING_TYPE", "POST", "Nmgroup", ""
ins_TblCALL.addColumn "Cat_Groupusers", "STRING_TYPE", "POST", "Nmgroupusers", ""
ins_TblCALL.addColumn "Motivation", "STRING_TYPE", "POST", "Motivation", ""
ins_TblCALL.addColumn "Cat_IP", "STRING_TYPE", "POST", "IP", ""
ins_TblCALL.addColumn "Locationdes", "STRING_TYPE", "POST", "Location1", ""
ins_TblCALL.addColumn "Contactperson", "STRING_TYPE", "POST", "contactperson", ""
ins_TblCALL.addColumn "CAT_HW", "STRING_TYPE", "POST", "itemsbox", ""
ins_TblCALL.addColumn "Calltype", "STRING_TYPE", "POST", "calltype", ""
ins_TblCALL.addColumn "uploadfile", "FILE_TYPE", "FILES", "Uploadfile", ""
ins_TblCALL.addColumn "UsrCostcenter", "STRING_TYPE", "POST", "UsrCostcenter", ""
ins_TblCALL.addColumn "CAT_HW_quantity", "NUMERIC_TYPE", "POST", "Quantity", ""
ins_TblCALL.addColumn "UsrCostcenterdes", "STRING_TYPE", "POST", "costdes", ""
ins_TblCALL.addColumn "Usrorgcode", "STRING_TYPE", "POST", "Usrorgcode", ""
ins_TblCALL.addColumn "Usrdept", "STRING_TYPE", "POST", "dept", ""
ins_TblCALL.addColumn "UsrPsn", "STRING_TYPE", "POST", "UsrPsn", ""
ins_TblCALL.addColumn "UsrPhonenr", "STRING_TYPE", "POST", "UsrPhonenr", ""
ins_TblCALL.addColumn "Rqname", "STRING_TYPE", "POST", "Rqname", ""
ins_TblCALL.addColumn "RqPsn", "STRING_TYPE", "POST", "RqPsn", ""
ins_TblCALL.addColumn "Rqemail", "STRING_TYPE", "POST", "Rqemail", ""
ins_TblCALL.addColumn "Division", "STRING_TYPE", "POST", "Division", ""
ins_TblCALL.addColumn "Manager", "STRING_TYPE", "POST", "Manager", ""
ins_TblCALL.addColumn "Region", "STRING_TYPE", "POST", "Region", ""
ins_TblCALL.addColumn "Country", "STRING_TYPE", "POST", "County", ""
ins_TblCALL.addColumn "City", "STRING_TYPE", "POST", "City", ""
ins_TblCALL.addColumn "Location", "STRING_TYPE", "POST", "Location", ""
ins_TblCALL.addColumn "EX_SMTP", "STRING_TYPE", "POST", "SMTP", ""
ins_TblCALL.addColumn "EX_addSMTP", "STRING_TYPE", "POST", "AdditionalSMTP", ""
ins_TblCALL.addColumn "EX_title", "STRING_TYPE", "POST", "Mailtitle", ""
ins_TblCALL.addColumn "EX_department", "STRING_TYPE", "POST", "Maildept", ""
ins_TblCALL.setPrimaryKey "CALLID", "NUMERIC_TYPE", "", ""
%>
<%
' Smart Mailer 1.0.2
' Send on submit of form frchg
' Use progress green_mailprogress.htm
' dimentions 300, 100
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
Server.ScriptTimeout = 300
Set sm1 = new SmartMailer
sm1.checkVersion "1.02"
sm1.smtpSetup "mailgate.nl", "25", "", ""
sm1.component = "aspemail"
sm1.tmpFolder = ""
sm1.embedImages = false
sm1.progressBar = "green_mailprogress.htm"
sm1.ignore_errors = true
sm1.setFrom "rajesh.kisoenpersad@klm.com", "rajesh.kisoenpersad@klm.com"
sm1.setTo "rajesh.kisoenpersad@klm.com", "rajesh.kisoenpersad@klm.com"
sm1.setCc "rajesh kisoenpersad", "rajesh.kisoenpersad@klm.com"
sm1.setBcc "", ""
sm1.Subject = "() New Change Request"
' using template for body
sm1.setBody_Template_html "chgmail.asp"
' Attachments none
sm1.sendMail "one"
end if
SM_mailAction = getMailAction()
%>
<%
'Execute all the registered transactions
tNGs.executeTransactions
%>
<%
'Execute all the registered transactions
tNGs.executeTransactions
%>
<%
'Get the transaction recordset
Dim rsTblCALL
Dim rsTblCALL_numRows

Set rsTblCALL = tNGs.getRecordset("TblCALL")
rsTblCALL_numRows = 0
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top