Is there a way in ASP or perhaps a different technology to send out an email to certain email addresses when a web page has been changed or updated? any help would be appreciated
That depends on how you update your pages. If your site is mostly coming out of a database, it shouldn't be a problem. Everytime some content/record gets updated, you can have an automatic email sent to your users.
If you use FTP for example, it's going to be a different story, and as far as I know you will probably need some other technology other than ASP.
I suppose your server has CDO Mail (which comes with NT) installed. I presume you also have a table with the email addresses of the persons you want to notify of the changes.
Get ready, here's the code (place it in the page where you have your update-query for the DB with the content, right after the actual code to update your DB):
<%
Code to update you contenttable goes here
%>
<%
'First, lets get the connection
Set MyConn=Server.CreateObject("ADODB.Connection"
MyConn.Open "PROVIDER=MSDASQL;" & _
"DRIVER={Microsoft Access Driver (*.mdb)}; " & _
"DBQ=" & server.mappath("MyDatabase.mdb"
MySQL="Select * from TableName"
Set MyRs=MyConn.Execute(MySQL)
'Get the emailaddresses from the recordset and place them in a variable called MyVar:
MyRs.MoveFirst
MyVar= ""
delimiter = ""
do while not MyRs.eof
If Not IsNull(MyRs("email") Then
MyVar= MyVar & delimiter & MyRs("email"
delimiter = "; "
End If
MyRs.movenext
loop
'Okay, we have the list of addresses now...
'Let's compose the body
MyBody="Our page has been updated" & vbcrlf & _ "Check it out at
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.