navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

cdonts email notification

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> cdonts email notification
Page: [1]
 
mjmtravel

 

Posts: 257
Joined: 7/30/2006
Status: offline

 
cdonts email notification - 2/6/2008 17:54:54   
I hope this is easy. How do I change this code to just let me know the form has been updated and not with all of the fields. I just want a email notification that the form was updated.
I've looked through the forum and all I can find is updating with all the form fields.

Thanks, everyone on this forum has been so helpful!!

Dim myMail

' Create a new instance of the New Mail Object
Set myMail = CreateObject("CDONTS.NewMail")
Body = Body & "The following information was submitted:" & vbCrlf
Body = Body & "==============================================================" & vbCrlf
Body = Body & "On "& request.form("DATE") & vbCrlf
Body = Body & "OFFICE: "& request.form("OFFICE") & vbCrlf
Body = Body & "DATE DIE NEEDED: "& request.form("DateDieNeeded") & vbCrlf
Body = Body & "CUSTOMER: "& request.form("CUSTOMER") & vbCrlf
Body = Body & "ITEM "& request.form("ITEM") & vbCrlf
Body = Body & "CAD NUMBER: "& request.form("CAD_Number") & vbCrlf
Body = Body & "PROJECT/PARENT/JDE NO: "& request.form("Project_Parent_JDE_No") & vbCrlf
Body = Body & "ITEM IS: "& request.form("Item_Is") & vbCrlf
Body = Body & "COMPONENT JDE NO: "& request.form("Component_JDE_No") & vbCrlf
Body = Body & "MACHINE QUOTED: "& request.form("Machine_Quoted") & vbCrlf
Body = Body & "EXTRA MYLAR: "& request.form("ExtraMylar") & vbCrlf
Body = Body & "EMBOSSING NO: "& request.form("Embossing_No") & vbCrlf
Body = Body & "SPECIAL INSTRUCTIONS: "& request.form("SpecialInstructions") & vbCrlf
Body = Body & "SALES REP: "& request.form("SalesRep") & vbCrlf
Body = Body & "CS REP: "& request.form("CS_Rep") & vbCrlf
Body = Body & "BUYER: "& request.form("Buyer") & vbCrlf
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: cdonts email notification - 2/6/2008 18:10:18   
Basically all of the "body" stuff can be removed and replaced with :

Body = "Form updated"

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to mjmtravel)
mjmtravel

 

Posts: 257
Joined: 7/30/2006
Status: offline

 
RE: cdonts email notification - 2/6/2008 20:01:25   
Ok, how does this look and at what point to I put it in the form. I should of mentioned that the form is on the spooky diet and is password protected by spooky login. This should just give me the user that has updated only correct?


<%
Dim MyMail
Set MyMail = Server.CreateObject("CDO.Message")
Body = Body & "The following information was submitted:" & vbCrlf
Body = Body & "==============================================================" & vbCrlf
Body = Body & "<%=Request("UserName")%>"> & vbCrlf
Body = "Form updated"
MyMail.From = "travelbuff.net"
MyMail.To = "jmsbaker@msn.com"
MyMail.Subject = "Customer Updated Database"
MyMail.Body= Body
MyMail.Importance="2"
MyMail.Send()
Set MyMail = Nothing
%>

(in reply to Spooky)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: cdonts email notification - 2/6/2008 20:24:27   
Like so :

Body = "Form updated"
Body = Body & Request("UserName") & vbCrlf

%>


< Message edited by Spooky -- 2/10/2008 13:12:41 >


_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to mjmtravel)
mjmtravel

 

Posts: 257
Joined: 7/30/2006
Status: offline

 
RE: cdonts email notification - 2/6/2008 20:28:00   
Spooky, where do I insert this into the form. I have tried at the end of the form and just below the red code at the top, neither seem to work.

(in reply to Spooky)
mjmtravel

 

Posts: 257
Joined: 7/30/2006
Status: offline

 
RE: cdonts email notification - 2/10/2008 12:34:40   
Still trying to get an update email once the form has been updated.
Ok I think my code is right but I guess I'm not picking the right spot to put it in my form. It's on the spooky diet and spooky password protected. Below it the end of my form. I've tried it after the red code at the top and hidden input part of the form all with no luck.

Do I need to ad some sort of form closure. Also this is the 3 part form with updating a database and showing results. The form I'm trying to put it on is the one with the submit button. Any help!!

<%
Dim MyMail
Set myMail = CreateObject("CDONTS.NewMail")
Body = Body & Request("UserName") & vbCrlf
Body = "Form updated"

%>
MyMail.From = "mysite.net"
MyMail.To = "jmsb@msn.com"
MyMail.Subject = "Customer Updated Database"
MyMail.Body= Body
MyMail.Importance="2"
MyMail.Send()
Set MyMail = Nothing
%>



<tr>
<td width="163">
<font face="Tahoma" size="2" color="#242424"><b>Birthdate2:</b></font></td>
<td width="288">
<input NAME="Birthdate2" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"Birthdate2")%>" tabindex="30"></td>
</tr>
<tr>
<td COLSPAN="2"><font face="Tahoma">
<font size="2" color="#242424"><br>
</font><font color="#242424">
<input TYPE="submit" NAME="fp_submit" value="Update"><input TYPE="Reset" NAME="fp_reset"></font></font></td>
</tr>
</table>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
<p> </p>
<input type="hidden" name="UserName" value="<%=Request("UserName")%>">
</form>
<p> </td>
<td width="19"> </td>
</tr>
<tr align="left" valign="top">
<td width="18" height="277"><img src="images/spacer.gif" width="18" height="1"></td>
<td width="725" colspan="2" height="277">
<hr>
<p> </p>
<p> </p>
<p> </td>
<td width="19" height="277"><img src="images/spacer.gif" width="19" height="1"></td>
</tr>
</table></td>

(in reply to mjmtravel)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: cdonts email notification - 2/10/2008 13:14:08   
This code :

<%
Dim MyMail
Set myMail = CreateObject("CDONTS.NewMail")
Body = "Form updated"& vbCrlf
Body = Body & Request("UserName") 

MyMail.From = "mysite.net"
MyMail.To = "jmsb@msn.com"
MyMail.Subject = "Customer Updated Database"
MyMail.Body= Body
MyMail.Importance="2"
MyMail.Send()
Set MyMail = Nothing
%> 


Needs to be on the page that processes the form, not the form page itself


_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to mjmtravel)
mjmtravel

 

Posts: 257
Joined: 7/30/2006
Status: offline

 
RE: cdonts email notification - 2/10/2008 16:04:19   
Ok, I see, but I still cannot seem to put it in the right place. I either get a internal server error on the page when I put it in after the log in script or half the script shows up on the bottom of the page.

(in reply to Spooky)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: cdonts email notification - 2/10/2008 16:50:28   
Can you show us the page code? you may be adding in the code delimiters when you dont need to

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to mjmtravel)
mjmtravel

 

Posts: 257
Joined: 7/30/2006
Status: offline

 
RE: cdonts email notification - 2/10/2008 16:52:50   
Spooky, I had the code out to update but here is the code from the update form page.

<% 
If Session("UserName")&"" = "" Then 
Response.redirect "/index.asp?Redirect=" &Request.Servervariables("URL")
End if 
%>
<html>
<head>
<title>My Trips Page</title>
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="robots" content="noindex,nofollow">
<meta name="description" content="Travel Buff.net is the new premier website for Nude & Clothing optional vacations, resorts and beaches.">
<meta name="keywords" content="Clothing optional, nude beaches, nude travel, clothing optional travel, clothing optional resorts, nude resorts, clothing optional vacations, nude vacations.">
<meta name="VI60_DTCScriptingPlatform" content="Server (ASP)">
<META HTTP-EQUIV="refresh" content="5;URL=1personaltravelinfo.asp"> 
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet"></head>

<body bgcolor="#D6C5BA">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td> </td>
    <td width="766" align="left" valign="top">
	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="766" height="295">
            <param name="movie" value="Flash/main.swf?active=2">
            <param name="quality" value="high">
            <embed src="Flash/main.swf?active=2" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="766" height="295"></embed>
        </object></td>
      </tr>
      <tr>
        <td align="left" valign="top">
		<table width="100%"  border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
          <tr align="left" valign="top">
            <td width="18"> </td>
                        <td height="100%" colspan="3">
                          <div style="padding-left:6px; padding-top:5px; color: #7b7b7b; font-size: 11px; font-family: tahoma; padding-right:25px">
							<font size="3" color="#242424"><b>Thank You for 
							Updating your Records!</b></font> <p align="right"> </div></td>
            <td width="4"> </td>
          </tr>
          <tr align="left" valign="top">
            <td width="18"> </td>
            <td width="140">
			<table width="125"  border="0" cellspacing="2" cellpadding="0" id="table1">
  <tr align="left" valign="middle">
    <td width="9" height="15"><img src="images/point_1.jpg" width="3" height="5" vspace="3"></td>
    <td height="18"><span class="style8">
	<font color="#474747">
	<a href="1mytrips.asp" style="text-decoration: none"><font color="#474747">My 
	Personal <br>
	Trip Log</font></a></font></span></td>
  </tr>
  <tr align="left" valign="middle">
    <td width="9" height="15"><img src="images/point_1.jpg" width="3" height="5" vspace="3"></td>
    <td height="18"><span class="style8">
	<a href="newsletter.html" style="text-decoration: none">
	<font color="#474747">Update Trip Comments</font></a></span></td>
  </tr>
  <tr align="left" valign="middle">
    <td width="9" height="15"><img src="images/point_1.jpg" width="3" height="5" vspace="3"></td>
    <td height="18"></td>
  </tr>
</table>
			<table width="125"  border="0" cellspacing="2" cellpadding="0" id="table2">
  <tr align="left" valign="middle">
    <td width="9" height="15"><img src="images/point_1.jpg" width="3" height="5" vspace="3"></td>
    <td height="18"></td>
  </tr>
  <tr align="left" valign="middle">
    <td width="9" height="15"><img src="images/point_1.jpg" width="3" height="5" vspace="3"></td>
    <td height="18"></td>
  </tr>
  <tr align="left" valign="middle">
    <td width="9" height="15"><img src="images/point_1.jpg" width="3" height="5" vspace="3"></td>
    <td height="18"></td>
  </tr>
</table>
			</td>
            <td width="585">
			<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="UPDATE Customers SET Traveler1FirstName = '::Traveler1FirstName::', Traveler1LastName = '::Traveler1LastName::', Traveler2FirstName = '::Traveler2FirstName::', Traveler2LastName = '::Traveler2LastName::', HomeAddress = '::HomeAddress::', City = '::City::', StateOrProvince = '::StateOrProvince::', ZipCode = '::ZipCode::', HomePhone = '::HomePhone::', BusinessPhone = '::BusinessPhone::', MobilePhone = '::MobilePhone::', FaxNumber = '::FaxNumber::', EmailAddress = '::EmailAddress::', CCType = '::CCType::', CCNumber = '::CCNumber::', ExpireDate = '::ExpireDate::', CSVNumber = '::CSVNumber::', AnniversaryDate = '::AnniversaryDate::', Birthdate1 = '::Birthdate1::', Birthdate2 = '::Birthdate2::'  WHERE (UserName = '" & session("UserName") & "')"     
fp_sDefault="UserName"
fp_sNoRecords="Your Personal Travel Information Has Been Updated"
fp_sDataConn="Database2"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&CustomerID=3&UserID=3&UserName=202&Traveler1FirstName=202&Traveler1LastName=202&Traveler2FirstName=202&Traveler2LastName=202&CompanyOrDepartment=202&HomeAddress=202&City=202&StateOrProvince=202&ZipCode=3&BusinessAddress=202&BusinessCity=202&BusinessState=202&BusinessZip=3&HomePhone=202&BusinessPhone=202&Extension=202&MobilePhone=202&FaxNumber=202&EmailAddress=202&Passport1=3&IssueDate=135&ExpirationDate=135&PlaceofIssue=202&Passport2=3&IssueDate2=135&ExpirationDate2=135&PlaceofIssue2=202&DriversLicense1=202&DriversLicense2=202&CCType=202&CCNumber=202&ExpireDate=135&CSVNumber=202&Social1=202&Social2=202&FreqFlyer1=202&FreqFlyer2=202&AnniversaryDate=135&Birthdate1=135&Birthdate2=135&MedicalDiet=202&BedPref=202&CabinRoomType=203&SmokingPref=11&MemberClubNumbers=202&EmergencyContactInformation=202&Misc=202&ContactID=3&"
fp_iDisplayCols=37
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<table BORDER="1" width="585">
				<tr>
					<td><b>Traveler1 First Name:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"Traveler1FirstName")%></td>
				</tr>
				<tr>
					<td width="210"><b>Traveler1 Last Name:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"Traveler1LastName")%></td>
				</tr>
				<tr>
					<td width="210"><b>Traveler2 First Name:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"Traveler2FirstName")%></td>
				</tr>
				<tr>
					<td width="210"><b>Traveler2 Last Name:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"Traveler2LastName")%></td>
				</tr>
				<tr>
					<td width="210"><b>Home Address:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"HomeAddress")%></td>
				</tr>
				<tr>
					<td width="210"><b>City:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"City")%></td>
				</tr>
				<tr>
					<td width="210"><b>State Or Province:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"StateOrProvince")%></td>
				</tr>
				<tr>
					<td width="210"><b>Zip Code:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"ZipCode")%></td>
				</tr>
				<tr>
					<td width="210"><b>Home Phone:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"HomePhone")%></td>
				</tr>
				<tr>
					<td width="210"><b>Business Phone:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"BusinessPhone")%></td>
				</tr>
				<tr>
					<td width="210"><b>Mobile Phone:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"MobilePhone")%></td>
				</tr>
				<tr>
					<td width="210"><b>Fax Number:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"FaxNumber")%></td>
				</tr>
				<tr>
					<td width="210"><b>Email Address:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"EmailAddress")%></td>
				</tr>
				<tr>
					<td width="210"><b>CC Type:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"CCType")%></td>
				</tr>
				<tr>
					<td width="210"><b>CC Number:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"CCNumber")%></td>
				</tr>
				<tr>
					<td width="210"><b>Expire Date:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"ExpireDate")%></td>
				</tr>
				<tr>
					<td width="210"><b>CSV Number:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"CSVNumber")%></td>
				</tr>
				<tr>
					<td width="210"><b>Anniversary Date:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"AnniversaryDate")%></td>
				</tr>
				<tr>
					<td width="210"><b>Birthdate1:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"Birthdate1")%></td>
				</tr>
				<tr>
					<td width="210"><b>Birthdate2:</b></td>
					<td>
					<%=FP_FieldVal(fp_rs,"Birthdate2")%></td>
				</tr>
				</table>
			<hr>
			<!--#include file="_fpclass/fpdbrgn2.inc"-->
<p> </td>
            <td width="19"> </td>
          </tr>
          <tr align="left" valign="top">
            <td width="18" height="48"><img src="images/spacer.gif" width="18" height="1"></td>
            <td width="725" colspan="2">
			 </td>
            <td width="19" height="48"><img src="images/spacer.gif" width="19" height="1"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="47" align="left" valign="middle" background="images/bottom_1.jpg"><div align="center" style="padding-top:0px ">
			<a class="style13" style="text-decoration:none " href="privacypage.html">Copyright 2007-2008 © Travel 
			Buff.net. All rights reserved | Privacy Policy</a></div></td>
      </tr>
    </table></td>
    <td> </td>
  </tr>
  <tr>
    <td height="386"> </td>
    <td width="766" align="left" valign="top" height="386"> </td>
    <td height="386"> </td>
  </tr>
</table>
</body>
</html>


< Message edited by rdouglass -- 2/25/2008 9:37:27 >

(in reply to Spooky)
mjmtravel

 

Posts: 257
Joined: 7/30/2006
Status: offline

 
RE: cdonts email notification - 2/24/2008 17:10:11   
Ok, Here is the code in the form. The form works but I get no email.

<td width="210"><b>CSV Number:</b></td>
<td>
<%=FP_FieldVal(fp_rs,"CSVNumber")%></td>
</tr>
<tr>
<td width="210"><b>Anniversary Date:</b></td>
<td>
<%=FP_FieldVal(fp_rs,"AnniversaryDate")%></td>
</tr>
<tr>
<td width="210"><b>Birthdate1:</b></td>
<td>
<%=FP_FieldVal(fp_rs,"Birthdate1")%></td>
</tr>
<tr>
<td width="210"><b>Birthdate2:</b></td>
<td>
<%=FP_FieldVal(fp_rs,"Birthdate2")%></td>
</tr>
<%

Dim objNewMail

' First create an instance of NewMail Object
Set objNewMail = Server.CreateObject(" CDONTS.NewMail" )
objNewMail.From = " TravelBuff.net"
objNewMail.To = " info@travelbuff.net"

objNewMail.Subject = " text goes here"
objNewMail.Body = " text goes here"

objNewMail.Send
Set objNewMail = Nothing


%>
</table>
<hr>
<!--#include file="_fpclass/fpdbrgn2.inc"-->

(in reply to mjmtravel)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: cdonts email notification - 2/25/2008 9:39:22   
<$.02>
Are you certain you have CDONTS on your server? Most hosts now are using CDOSYS.
</$.02>

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to mjmtravel)
mjmtravel

 

Posts: 257
Joined: 7/30/2006
Status: offline

 
RE: cdonts email notification - 2/25/2008 17:09:42   
Yes I'm sure. I'm using it with the spooky log in. This page the form is on is also protected with the spooky log in if that makes any difference. I receive mail perfectly when a new user logs in or registers.

(in reply to rdouglass)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: cdonts email notification - 2/26/2008 14:16:57   
If you do just this on a separate page , is a mail sent?

Testing email......
<%
Dim objNewMail
Set objNewMail = Server.CreateObject("CDONTS.NewMail" )
objNewMail.From = "***********"
objNewMail.To = "**********"
objNewMail.Subject = " text goes here"
objNewMail.Body = " text goes here"
objNewMail.Send
Set objNewMail = Nothing
%> 


Where the stars are, just put in your email address (preferably from the same domain)

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to mjmtravel)
mjmtravel

 

Posts: 257
Joined: 7/30/2006
Status: offline

 
RE: cdonts email notification - 2/26/2008 18:27:52   
Spooky as far as I can tell its not working. I created a new page with only this test, uploaded it and opened the page. Nothing. Here is what the page looked like. Not sure what the deal is, like I said I'm using Cdonts with your log in and that mail works fine.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Testing email</title>
</head>

<body>
Testing email......
<%
Dim objNewMail
Set objNewMail = Server.CreateObject("CDONTS.NewMail" )
objNewMail.From = "info@travel.net"
objNewMail.To = "info@travel.net"
objNewMail.Subject = " text goes here"
objNewMail.Body = " text goes here"
objNewMail.Send
Set objNewMail = Nothing
%>
</body>

</html>

(in reply to Spooky)
mjmtravel

 

Posts: 257
Joined: 7/30/2006
Status: offline

 
RE: cdonts email notification - 2/26/2008 18:30:21   
Wow, I really apoligize. My other site is using cdonts, this one is using cdosys. I'm checking the forum for how to correct this. Again terribly sorry.

(in reply to mjmtravel)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> cdonts email notification
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts