473,809 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CDOSYS mail script

1 New Member
I created a form, cabreg.asp, with a "Send" button and cdosys_form.asp script. However, I got the message "Page cannot be displayed" Please help and here are my files

---- CABREG.ASP -----

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>CAB Registration</title>
</head>

<body>
<!--%
'************** *************** *************** *************** *********'
' Title : cabreg.asp '
' Author : Jennifer Pham '
' Modified by : '
' Date : '
' Form : This is a CAB Registration form. '
'************** *************** *************** *************** *********'
%-->
<form action="cdosys_ form.asp" method="post" enctype="multip art/form-data" name="cabreg" id="cabreg">
<p align="center"> <img src="CAB Heading - Denver 06.jpg" width="650" height="97"></p>
<p align="center" class="style1"> Denver CAB Registration Form</p>
<div align="center">
<table width="386" border="1">
<tr>
<td width="200">Nam e:</td>
<td width="200"><in put name="name" type="text" id="name" size="50"></td>
</tr>
<tr>
<td width="200">Job Title:</td>
<td width="200"><in put name="title" type="text" id="title" size="50"></td>
</tr>
<tr>
<td width="200">Dep artment/Agency</td>
<td width="200"><in put name="agency" type="text" id="agency" size="50"></td>
</tr>
<tr>
<td width="200">Bur eau:</td>
<td width="200"><in put name="bureau" type="text" id="bureau" size="50"></td>
</tr>
<tr>
<td width="200">Add ress:</td>
<td width="200"><in put name="address" type="text" id="address" size="50"></td>
</tr>
<tr>
<td width="200">Cit y: </td>
<td width="200"><in put name="city" type="text" id="city" size="40"></td>
</tr>
<tr>
<td width="200">Sta te:</td>
<td width="200"><in put name="state" type="text" id="state" size="40"></td>
</tr>
<tr>
<td width="150">Zip :</td>
<td width="150"><in put name="zip" type="text" id="zip" size="40"></td>
</tr>
<tr>
<td width="150">Tel ephone:</td>
<td width="150"><in put name="telephone " type="text" id="telephone" size="25"></td>
</tr>
<tr>
<td width="150">Fac simile:</td>
<td width="150"><in put name="facsimile " type="text" id="facsimile" size="25"></td>
</tr>
<tr>
<td width="200">E-Mail:</td>
<td width="200"><in put name="email" type="text" id="email" size="50"></td>
</tr>
</table>
</div>
<div align="center">
<table width="674" border="1">
<tr>
<td width="500"><p> I would like to attend the CAB group dinner at The Fort:
</td>
<td width="357"><in put name="Dinner" type="radio" value="Yes">
Yes
<input name="Dinner" type="radio" value="No">
No</td>
</tr>
<tr>
<td><blockquote >If yes &ndash; select a menu option:</blockquote></td>
<td>
<input name="menu" type="radio" value="Sirloin" >
Top Sirloin<br>
<input name="Menu" type="radio" value="Lamb">
Lamb Chops<br>
<input name="Menu" type="radio" value="Salmon">
Salmon<br>
<input name="Menu" type="radio" value="Chicken" >
Chicken<br>
</tr>
<tr>
<td width="500"><p> I would like to attend the tour of the U.S. Denver Mint::
</td>
<td width="357"><in put name="Tour" type="radio" value="Yes">
Yes
<input name="Tour" type="radio" value="No">
No</td>
</tr>
<tr>
<td width="500"><p> I would like my confirmation package sent via:
</td>
<td width="357"><in put name="Sendoptio n" type="radio" value="Email">
E-Mail
<input name="Sendoptio n" type="radio" value="Fax">
Fax</td>
</tr>

</table>
</div>
<p align="center"> <strong>Fax or email this registration form no later than July 31, 2006 to</strong>:</p>
<p align="center"> San Francisco Financial Center<br>
<a href="mailto:pi b@fms.treas.gov "><strong>pib@f ms.treas.gov</strong></a><br>

Fax: 510-594-7341<br>
</p>
<p align="center">
<input type="submit" name="Submit" value="Send">
<input name="Reset" type="reset" id="Reset" value="Reset">
</p>
</form>

</body>
</html>

--- CDOSYS_FORM.ASP ----

<!--%
'************** *************** *************** *************** *********'
' Title : cdosys_form.asp '
' Author : Jennifer Pham '
' Modified by : '
' Date : '
' Main Function: This script is used to send the registration '
'************** *************** *************** *************** *********'
%-->
<%@LANGUAGE="VB SCRIPT" CODEPAGE="1252" %>
<%
Dim cabreg
Dim cabregcon
Dim flds
Dim inbody
Dim inname
Dim intitle
Dim inagency
Dim inbureau
Dim inaddress
Dim incity
Dim instate
Dim inzip
Dim intelephone
Dim infacsimile
Dim inemail
Dim inDinner
Dim inMenu
Dim inTour
Dim inSendoption
inname = Request.Form("n ame")
intitle = Request.Form("t itle")
inagency = Request.Form("a gency")
inbureau = Request.Form("b ureau")
inaddress = Request.Form("a ddress")
incity = Request.Form("c ity")
instate = Request.Form("s tate")
inzip = Request.Form("z ip")
intelephone = Request.Form("t elephone")
infacsimile = Request.Form("f acsimile")
inemail = Request.Form("e mail")
inDinner = Request.Form("D inner")
inMenu = Request.Form("M enu")
inTour = Request.Form("T our")
inSendoption = Request.Form("S endoption")

Inbody = "DENVER CAB REGISTRATION FORM” & vbcrlf
Inbody = Inbody & "Name: "& inname & vbcrlf
Inbody = Inbody & "Title: "& intitle & vbcrlf
Inbody = Inbody & "Agency: "& inagency & vbcrlf
Inbody = Inbody & "Bureau: "& inbureau & vbcrlf
Inbody = Inbody & "Address: "& inaddress & vbcrlf
Inbody = Inbody & "City: "& incity & vbcrlf
Inbody = Inbody & "State: "& instate & vbcrlf
Inbody = Inbody & "Zip: "& inzip & vbcrlf
Inbody = Inbody & "Telephone: "& intelephone & vbcrlf
Inbody = Inbody & "Facsimile: "& infacsimile & vbcrlf
Inbody = Inbody & "E-mail: "& inemail & vbcrlf
Inbody = Inbody & "Attend the CAB group dinner: "& inDinner & vbcrlf
Inbody = Inbody & "Choice for dinner: "& inMenu & vbcrlf
Inbody = Inbody & "Attend the tour: "& inTour & vbcrlf
Inbody = Inbody & "Package sent via: "& inSendoption & vbcrlf

Set cabreg = Server.CreateOb ject("CDO.Messa ge")
set cabregcon = Server.CreateOb ject("CDO.Confi guration")
Set flds = cabregcon.Field s
cabregcon.Confi guration.Fields .Item("http://schemas.microso ft.com/cdo/configuration/sendusing") = 2
cabregcon.Confi guration.Fields .Item("http://schemas.microso ft.com/cdo/configuration/smtpserver") = "dm4.publicdebt .treas.gov"
cabregcon.Confi guration.Fields .Item("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) = 25
cabregcon.Confi guration.Fields .Item("http://schemas.microso ft.com/cdo/configuration/smtpusessl") = False
cabregcon.Confi guration.Fields .Item("http://schemas.microso ft.com/cdo/configuration/smtpconnectiont imeout") = 60


cabregcon.Confi guration.Fields .Update
Set cabreg.Configur ation = cabregcon
cabreg.From = inname
cabreg.To = "sfc@fms.treas. gov"
cabreg.Subject = "Denver CAB Registration"
cabreg.TextBody = Inbody
cabreg.Send
Set cabreg = Nothing
Set cabregcon = Nothing
set flds = Nothing
Response.Write( "The e-mail has been sent")
%>
Sep 8 '06 #1
4 5837
jayadevi
7 New Member
Hi ,

Your code is working fine. Actually I copied the code from ur page and pasted in my textpad.

Inbody = "DENVER CAB REGISTRATION FORM” & vbcrlf

In the line above, instead of the second "(double quotes) near FORM, it just pasted some other character like pipeline. That time , it was showing error page 'Page cannot be displayed". Then I changed that to " , it is working fine. Could you please try this? If you have any more query mail to me in this Id: "jayadevi.s@tcs .com".

Regards,
Jaya.S
Sep 14 '06 #2
meher29
1 New Member
Thanks Jaya,

I corrected the form as per your posting but it still does not work.

I tried it in Netscape and it returns the error.

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'Configuration'

/cdosys/cdosys_form.asp , line 67


The line 67 in the file is given as following :

cabregcon.Confi guration.Fields .Item("http://schemas.microso ft.com/cdo/configuration/sendusing") = 2

I hope you can help me. I am giving smtp as localhost and port 25

Meher
Sep 20 '06 #3
lalit26011983
5 New Member
Hi.....
I m getting a error: when i use above code....

Public member 'Configuration' on type 'IConfiguration ' not found...

I m using windows2000 and .net 2003 version (.net Framework 1.1)
Plz help me...
Thanks....
Sep 22 '06 #4
jayadevi
7 New Member
Hi Meher,

Instead of making the code complex by using Configurations , you can use following simple code,

Expand|Select|Wrap|Line Numbers
  1. Set cabreg=CreateObject("CDO.Message")
  2. cabreg.Subject="Denver CAB Registration"
  3. cabreg.From=inname
  4. cabreg.To=sfc@fms.treas.gov"
  5. cabreg.TextBody=Inbody
  6. cabreg.Send
  7. set cabreg=nothing
  8.  
  9. Response.Write("The e-mail has been sent")
  10.  
  11.  
I think this will work. Is this Okay for u or using SMTP only you want to send mail?

Hi Lalit,

Answering your question, CDOSYS dont work in Windows 2000. If you want to send mail in Windows 2000, u have to use CDONTS.
I will give one sample code.

Expand|Select|Wrap|Line Numbers
  1. Set objMail=Server.CreateObject("CDONTS.NewMail")
  2.             objMail.From="someone1@abc.com"
  3.             objMail.To="someone2@abc.com"                            objMail.Subject="Testing mail"
  4.             objMail.Body="mail Body"
  5.             objMail.Send
  6. Set objMail=Nothing
  7.  
This will help you.

Thanks,
Jaya.S
Oct 31 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
7459
by: Matthew Loraditch | last post by:
I have a form mail processor from brainjar.com, I am using.(http://www.brainjar.com/asp/formmail/) I have modified it slightly to do some things. I am trying to get it to cc a copy of the email it generates to the person who filled out the form. I have added bolded part below to the actual email sending portion of the script. However i do not receieve two emails, only one, the email i do receive lists the cc: in the headers but that receipient...
14
13433
by: Neil Ginsberg | last post by:
I am using VBA/Access to send SMTP mail using CDO. I set a reference to "Microsoft CDO for Windows 2000 Library" (cdosys.dll). Everything works fine, both on my PC and on another PC. However, on another PC that the database was installed on, the user is getting the message, "The project contains a missing or broken reference to the file 'CDO.DLL' version 1.21." However, I don't have a reference to cdo.dll; my reference is to cdosys.dll....
2
2388
by: crushando | last post by:
hi i'm new to ASP and have to deal with some email scripting at the very start.I've collected some script pieces from a variaty of tutorial pages but haven't been able to send any mails yet. I'm pasting the latest version of the code: <% Dim sMsg
24
6279
by: Manuel | last post by:
Is it possible to embed an image, like a company logo in a CDOSYS generated message? If yes, I´ll apreciate some code sample. I´ve been able to format messages in html the way I like, but I can't figure out how to embed an image. Thanks for your time. -- Manuel
12
2219
by: Basr | last post by:
My provider removed suddenly the CDONTS from the server. Now I have to change my forms and I have to use the CDOSYS functionaltity Till now I used one script that could do the work with one page. I could send all my forms to that page and this page conveyed all the input by email. Now I want to make a script that can do the same job. This is too diffucult for me. I can make a script for the normal input for email forms but I want to...
5
4302
by: fcetrini | last post by:
Hello to the board, i'm facing this problem and i need some help: with cdosys i'm able to send e-mail from asp using the local exchange server. Now I also have to save the sent mail into the user's mailbox for future reference: how to??? i'm using: ..Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = ServerName ..Fields("http://schemas.microsoft.com/cdo/configuration/
8
7551
by: Akbur | last post by:
Dear all, I'm having major issues sending an email from my ASP.NET app. I'm getting a "Could not create 'CDO.Message' object". When I did a search for cdosys.dll in \win_location\system32, I could not find it. So I copied it from another Windows 2003 server, where it did exist. Another dependant file was missing too (inetcomm.dll).
2
5373
by: mister-Ed | last post by:
Trying to use cdosys mail, but this is giving me an "no such object" error. the hosting company is not much help, but their list of components offered does include cdosys mail: <form method="post" action="cdosys-godaddy.asp"><p class="bodymd- wh">Your Name: <input type="text" name="uname" id="uname"> <br>City: <input type="text" name="city" id="city"> <br>State:
8
3263
by: worldofrugs | last post by:
I'm hosted on a shared server with Godaddy.com... I have several forms on my website that all use the same ASP file to send out my forms.. It worked fine for a long time, but now the forms send to my e-mail arrive after a few hours instead of instantly. Calling Godaddy did not help as they stated all is working fine (no delays) on their end and refuse to help with custom scripts.. My emails are also hosted by godaddy like my website. ...
9
3029
by: paulmitchell507 | last post by:
I have a file called email2.asp which I am using to mail data obtained from a SQL query. I would like to pass the holiday_ID value in the querystring attached to the end of the URL. It all works except that I can't get the value of holiday_ID included as a querystring. As a test I can insert a value after the ?id= and this is passed as a querystring. I am sure it's just the syntax that I am having problem with
0
9721
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10635
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10378
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7653
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3013
bsmnconsultancy
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.