Hey!
I have another script where i pull all the information from the database and I want to send it to the person. What they do is they enter in their email, and if the email matches, than it will email them their login information.
How do you grab the info and than use that info and put it into an email to send?
Here is my code thus far for it:
<%
Function SendEmail()
Dim myMail
Set myMail = CreateObject("CDONTS.NewMail")
HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<title>Login Information</title>"
HTML = HTML & "</head>"
HTML = HTML & "<center><b>Your Login Information</b></center>"
HTML = HTML & "<br>Dear: "
HTML = HTML & "<br><br>Here is your login information:"
HTML = HTML & "<br> <b>User Name: </b>"
HTML = HTML & "<br> <b>Password: </b>"
HTML = HTML & "<br><br> Please print this page for your records, and keep this information in a safe place. You can always check to see if there are any updates by going to that site. When there is an update available, we will send an email alerting you of this."
HTML = HTML & "<br><br> Thank you,"
HTML = HTML & "<br>3B Software Team"
HTML = HTML & "</body>"
HTML = HTML & "</html>"
myMail.From = "a@a.com"
myMail.To = Request.Form("email")
myMail.Subject = "Free Update Login Information"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML
myMail.Send
End Function
%>
<%
Response.Expires = -1000 'Make sure the browser doesnt cache this page
Response.Buffer = True 'enables our response.redirect to work
If Request.Form("valuepassed") ="true" Then
CheckSignUpForm
Else
ShowSignUpForm
End If
Sub CheckSignUpForm
Dim myconn, verify, blnLoggedIn, email, objRS
Set verify = Server.CreateObject("ADODB.Connection")
verify.open = "Provider=SQLOLEDB.1;Password=XXX;Persist Security Info=True;User ID=XXX;Initial Catalog=XXX;Data Source=XXX"
email = Request.Form("email")
Set objRS = verify.execute("SELECT id,ordernum, firstname, lastname, username, pass FROM regfreeup WHERE email='" & email & "';")
If objRS.EOF Then '''NO RECORDS MATCH. PROCEED WITH LOGIN CREATION
blnLoggedIn = False
Response.Redirect "http://www.microsoft.com"
Else '''EVERYTHING PASSED CHANGE EMAIL
blnLoggedIn = True
(no idea how to grab that info and put it into the email up top.)
SendEmail()
Response.Redirect "http://www.yahoo.com"
End If
verify.close
set verify = nothing
ShowSignUpForm
End Sub
%>
<% Sub ShowSignUpForm %>
form
<%end sub%> 1 1864
On Fri, 25 Jun 2004 08:39:54 -0700, "Kenshin"
<Ke*****@discussions.microsoft.com> wrote: Hey!
I have another script where i pull all the information from the database and I want to send it to the person. What they do is they enter in their email, and if the email matches, than it will email them their login information.
How do you grab the info and than use that info and put it into an email to send?
Here is my code thus far for it:
First, do a Response.Write and make sure you're retrieving the info
correctly. To mail it, see: http://www.aspfaq.com/show.asp?id=2119
Jeff
<% Function SendEmail()
Dim myMail Set myMail = CreateObject("CDONTS.NewMail") HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL HTML = HTML & "<html>" HTML = HTML & "<head>" HTML = HTML & "<title>Login Information</title>" HTML = HTML & "</head>" HTML = HTML & "<center><b>Your Login Information</b></center>" HTML = HTML & "<br>Dear: " HTML = HTML & "<br><br>Here is your login information:" HTML = HTML & "<br> <b>User Name: </b>" HTML = HTML & "<br> <b>Password: </b>" HTML = HTML & "<br><br> Please print this page for your records, and keep this information in a safe place. You can always check to see if there are any updates by going to that site. When there is an update available, we will send an email alerting you of this." HTML = HTML & "<br><br> Thank you," HTML = HTML & "<br>3B Software Team" HTML = HTML & "</body>" HTML = HTML & "</html>"
myMail.From = "a@a.com" myMail.To = Request.Form("email") myMail.Subject = "Free Update Login Information" myMail.BodyFormat = 0 myMail.MailFormat = 0 myMail.Body = HTML myMail.Send
End Function %>
<% Response.Expires = -1000 'Make sure the browser doesnt cache this page Response.Buffer = True 'enables our response.redirect to work
If Request.Form("valuepassed") ="true" Then CheckSignUpForm Else ShowSignUpForm End If Sub CheckSignUpForm
Dim myconn, verify, blnLoggedIn, email, objRS Set verify = Server.CreateObject("ADODB.Connection") verify.open = "Provider=SQLOLEDB.1;Password=XXX;Persist Security Info=True;User ID=XXX;Initial Catalog=XXX;Data Source=XXX"
email = Request.Form("email")
Set objRS = verify.execute("SELECT id,ordernum, firstname, lastname, username, pass FROM regfreeup WHERE email='" & email & "';") If objRS.EOF Then '''NO RECORDS MATCH. PROCEED WITH LOGIN CREATION blnLoggedIn = False Response.Redirect "http://www.microsoft.com"
Else '''EVERYTHING PASSED CHANGE EMAIL blnLoggedIn = True (no idea how to grab that info and put it into the email up top.)
SendEmail() Response.Redirect "http://www.yahoo.com" End If
verify.close set verify = nothing
ShowSignUpForm End Sub
%>
<% Sub ShowSignUpForm %> form <%end sub%> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: cvillard |
last post by:
I am new to SQL, as old as it is. I am not new to programming I
normally just use Access.
I have two tables for a little project manager I made. After updates I
sent an email to the user. I need...
|
by: Julia Baresch |
last post by:
Hi everyone, I haven't found any reference to this problem on this
group or in Access 97 help. I hope someone here knows this - probably
a simple thing, but not obvious.
I designed a query to...
|
by: chadlupkes |
last post by:
I've been trying to create a simple (I hope) PHP application to send
emails to a membership list. I have yet to successfully connect to my
database to pull the names and email addresses. I'm...
|
by: comp_guy |
last post by:
hey guys, can anyone see where im going wrong in my code below? i am
making a registration form on a webpage before using php to send the
input data into a mySQL database. first off is the code for...
|
by: The Cool Geek |
last post by:
I'm building a dynamic site that has 3 data bases. One DB contains all
of my store info ID#, Name, Address, Phone. Another DB contains member
info ID, Name, address, email,phone,etc...
The 3rd DB...
| |
by: ArtDerailed |
last post by:
Hello there,
I too am having a somewhat similar problem and would very much appreciate some assistance. Through PHP, I have already set up my Flash actionscript to pass info and variables onto a...
|
by: sparks |
last post by:
We have a new project here, one that I have never tried maybe its easy
I don't know yet.
We have people that have records dating back over 5 yrs on a sql
server.
We have to build an access 2003...
|
by: SkipNRun |
last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list.
...
|
by: HughMcMenamin |
last post by:
Hi All ~ First time posting.
I have a module that works ... it contains:
Set objCDOMessage = CreateObject("CDO.Message")
With objCDOMessage
Set .Configuration = objCDOConfig
.From = "PSS...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |