desman
05-07-2003, 09:57 PM
Not to sure with cfm how to send an email just after a new insert to a sql server database. Anyway if someone could help that would be great, here is the code::
<cfquery datasource="sqlusers">
SET IDENTITY_INSERT NewMembers ON
INSERT INTO NetUsers (userid, Address , FirstName , Gender , JoinDate , LastName , Password , PostCode , State , Suburb , UserName )
VALUES (#NewUser#, '#form.Address#' , '#form.FirstName#', '#form.Gender#', '#dateformat(form.JoinDate,"yyyy-mm-dd")#', '#form.LastName#', '#form.Password#', '#form.PostCode#', '#form.State#', '#form.Suburb#', '#form.UserName#' )
SET IDENTITY_INSERT NewMembers OFF
</cfquery>
Need email to be sent to an admin here.
Also the email needs to extract the username and password to send to the admins.
Could someone help point me in the right direction?
Thanks
<cfquery datasource="sqlusers">
SET IDENTITY_INSERT NewMembers ON
INSERT INTO NetUsers (userid, Address , FirstName , Gender , JoinDate , LastName , Password , PostCode , State , Suburb , UserName )
VALUES (#NewUser#, '#form.Address#' , '#form.FirstName#', '#form.Gender#', '#dateformat(form.JoinDate,"yyyy-mm-dd")#', '#form.LastName#', '#form.Password#', '#form.PostCode#', '#form.State#', '#form.Suburb#', '#form.UserName#' )
SET IDENTITY_INSERT NewMembers OFF
</cfquery>
Need email to be sent to an admin here.
Also the email needs to extract the username and password to send to the admins.
Could someone help point me in the right direction?
Thanks
