This topic is locked

email notification

5/11/2004 10:42:10 AM
ASPRunnerPro General questions
Z
zard0f author

OK im stupid
I'm want to know if it is possible once a user enters new data into an access database using ASP runner asp pages, that when they click the save button can the data they have entered not only be submited to the database but also email to me?
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=575&image=1&table=forumtopics' class='bbc_emoticon' alt=':huh:' />

B
bronoman 5/11/2004

zard0f,
you will most probably need some sort of e-mail server to do this.

I'm using an SQL server which has some e-mail functionality build in to it. We wrote a SQL trigger that sends it to the SMTP (or mail) server.
There is probably a way to send an e-mail from your access database to say an outlook instance which is running on the same machine. This would however require some coding...
For starters, I suggest you check if you can find a suitable SMTP server that will work as your mail server.
bronoman

Sergey Kornilov admin 5/12/2004

Hi,
you will need to add some email notification code. Actual code depends on what ASP emailing component is installed on your Web server.
Here is the sample code I use for this purpose. This code uses Persits.MailSender component.

   

' send email

      Set Mail = Server.CreateObject("Persits.MailSender")

      Mail.Host = "mail.chicagowebs.com"

      Mail.From = "support@xlinesoft.com"

      Mail.FromName = "ASPRunner User"

      Mail.AddAddress "support@xlinesoft.com"

      Mail.Subject = "Subject"

      Mail.Body = Mail.Body & "New record added" & vbcrlf

      Mail.Send


As a quick fix you can put SQL statement that inserts data to the message body. Also you will need to replace mail server name and email addresses with your own.