Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

E-mail notification

Posted on 2005-04-27
7
Medium Priority
?
185 Views
Last Modified: 2010-07-27
Hey!

We are using forms to gather information for an event and the data is entered in an access DB. Although we created a master page which is complete data dump of the DB, we would like to get an e-mail notification that simply advise us that a client actually entered data in our DB.

In other words, once the client press submit the data is entered in DB and an e-mail is sent to us it doesn't need to have the subitted data into it, just a simple quick notification to remind us to go and create a report.

Our script are in ASP. The notification snippet could be in javascript too.

We've looked everywhere and no luck on finding it.\

Thanks!

Mario
0
Comment
Question by:Marcomnet
7 Comments
 
LVL 30

Expert Comment

by:GrandSchtroumpf
ID: 13881140
> We've looked everywhere and no luck on finding it.\
Google is a good start in such cases:  http://www.google.com/search?q=asp+send+mail+tutorial

Try this result, w3schools.com is a good source: http://www.w3schools.com/asp/asp_send_email.asp
0
 

Author Comment

by:Marcomnet
ID: 13882100
Fact is we know how to create forms to e-mail, we need an notification e-mail to be sent automatically after submitting the form just to tell us that someone added info to the DB

Mario
0
 
LVL 30

Expert Comment

by:GrandSchtroumpf
ID: 13884104
If you can do form to database and form to e-mail, then you just need to combine both in the same asp file.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Marcomnet
ID: 13884237
I understand...but

My form is already performing an action as to insert data in DB, how would I go inserting a second action in this form?

   <form method="POST" action="<%=MM_editAction%>" name="form1"> this is the form tag

How can I insert a second action?

Thank you!

Mario
0
 
LVL 30

Accepted Solution

by:
GrandSchtroumpf earned 2000 total points
ID: 13884254
You don't need to add a second action.
You need to modify your action to do both saving to DB and e-mail notification.
0
 
LVL 13

Expert Comment

by:nurbek
ID: 13916707
If you are already inserting the data into database
put the mail sending code after the insertion


If LCase(Request.ServerVariables("REQUEST_METHOD")) = "post" Then

 ' insert to database
  SQL = "INSERT INTO ....."
  objConn.Execute(SQL)

     'send mail here

End If

0
 

Expert Comment

by:funnymanas
ID: 14062221
Try this ...

one you have inserted the data in the database and the insert was successful ... try the following ...

<%
......
If (insert successfull) then
dim objEMail
set objEMail = Server.CreateObject("CDONTS.NewMail")
objEMail.To = [the email address you want the email to go]
objEMail.From = [the email address from who is sending the email.  TO and FROM can be the same person]
objEMail.subject = [subject of the email]
objEMail.body = [the text in the email]
objEmail.BodyFormat = 0
objEmail.MailFormat = 0
objEMail.send
set objEMail = nothing
end if
%>
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question