Discussion Locked

email notice when database updated?

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
how can i (with frontpage200) make it where when a database is appended too (via form) that it will email me saying the database is been updated?

2 replies

by jakl

If you have CDONTS permissions on your webserver you can use the following code in your ASP page.

'Email confirmation
'Who does this email come from? MAKE SURE TO CHANGE THIS TO YOUR EMAIL ADDRESS!
Const strFrom = "test@test.com"

'This information is optional
Dim strTo, strSubject, strHeader, strBody, strOldPass, strNewPass, strConfirmPass, strMessage

'Where does the email go to?
strTo = "receiver@test.com"

'Create email confirmation
'The header for theemail
strHeader = "Dear " & b_fname & " " & b_lname & ","

'The subject for the email
strSubject = "Test Subject"

'The body of the email
strBody = strHeader & ( vbCrLf & vbCrLf )
strBody = strBody & "Test Body " & vbCrLf & vbCrLf

'Time to send the email
Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.To = strTo
objCDO.From = strFrom

objCDO.Subject = strSubject
objCDO.Body = strBody

objCDO.Send

Set objCDO = Nothing

Hope this helps.

by bogdincescu

If you wish any update to some table - no matter if it is updated through your application or some other way - in Oracle you have the UTL_SMTP package that is intended exactly for sending e-mail from database stored procedures. You will have to callthose procs on a trigger on that table.
Still, if you wish to have those notifications only when updates are made through your application, then you will have to code that in your application. For instance, if using VB6 you have an ocx that helps you to send mail - I kind-of played with that once.
Anyway, you'll have to do some serious coding.
Sorry I don't know much about Front-Page, nor ASP.

This discussion is closed to new replies.