This topic is locked

email

3/14/2004 2:10:19 PM
ASPRunnerPro General questions
author

Befor I purchase I'd like to know if its possible to have an email sent to a designated box on a specific field change. For instance. Using a database for project tracking, a managers could enter a date of a project phase's completion and ASPRunner could alert the billing department by email to bill the customer whose record was changed.

Sergey Kornilov admin 3/17/2004

This is two step process. Take a look at this sample code.

  1. Save old value of DateComplete field when page loads
    Session("DateComplete") = rs("DateComplete")


2. When record is updated check if field value has changed

if Session("DateComplete")<>Request.Form("DateComplete") then

  Set objCDO = Server.CreateObject("CDONTS.NewMail")

  objCDO.To = "bgates@microsoft.com"

  objCDO.From = "bgates@microsoft.com"

  txtSubject = "Any text here"
  objCDO.Subject = "DateComplete updated"

  objCDO.Body = txtSubject

  objCDO.Send

  set objCDO = Nothing

end if


Please contact me directly at support AT xlinesoft.com if you need any help doing this.