Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 24th, 2003, 01:25 PM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automatic email and Random function

Greetings,
I was wondering if anybody know how to:
1. fire an automatic email notification as a result of an event (e.g., submitting a form)
2. generate random characters/numbers. Is there any random () function in ASP.
Are the above capabilities available any where in any of Wrox's ASP books?.
Your help will is really appreciated :)
 
Old June 25th, 2003, 01:41 AM
Authorized User
 
Join Date: Jun 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To generate a random number:
Function accNum()
Randomize
accNum = Int(999999 * Rnd + 3)
End Function
newCustID = accNum
...............
<INPUT TYPE="TEXT" NAME="CustomerID" SIZE=20 MAXLENGTH=6 VALUE="<%=newCustID%>">

To fire an email on submit:
<%
If (CStr(Request("MM_insert")) <> "") Then
Set JMail = Server.CreateObject("your mail server")
....................
' Redirect the user...
End if
%>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send an automatic email alert Based on Date/time lakshmi_annayappa ASP.NET 1.0 and 1.1 Basics 3 May 28th, 2007 12:07 AM
Sending automatic email by date field Ca_Chaz Access 2 March 31st, 2006 03:24 AM
send Email automatic vickyj Classic ASP Professional 3 March 14th, 2005 08:40 AM
Automatic Email send qadeerahmad General .NET 5 January 31st, 2005 09:11 PM
Automatic email capability wasaan Classic ASP Databases 1 June 24th, 2003 02:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.