472,372 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,372 software developers and data experts.

CDOSYS mail script

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 -----

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

'************************************************* *******************'
' Title : cabreg.asp '
' Author : Jennifer Pham '
' Modified by : '
' Date : '
' Form : This is a CAB Registration form. '
'************************************************* *******************'
<form action="cdosys_form.asp" method="post" enctype="multipart/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">
<td width="200">Name:</td>
<td width="200"><input name="name" type="text" id="name" size="50"></td>
<td width="200">Job Title:</td>
<td width="200"><input name="title" type="text" id="title" size="50"></td>
<td width="200">Department/Agency</td>
<td width="200"><input name="agency" type="text" id="agency" size="50"></td>
<td width="200">Bureau:</td>
<td width="200"><input name="bureau" type="text" id="bureau" size="50"></td>
<td width="200">Address:</td>
<td width="200"><input name="address" type="text" id="address" size="50"></td>
<td width="200">City: </td>
<td width="200"><input name="city" type="text" id="city" size="40"></td>
<td width="200">State:</td>
<td width="200"><input name="state" type="text" id="state" size="40"></td>
<td width="150">Zip:</td>
<td width="150"><input name="zip" type="text" id="zip" size="40"></td>
<td width="150">Telephone:</td>
<td width="150"><input name="telephone" type="text" id="telephone" size="25"></td>
<td width="150">Facsimile:</td>
<td width="150"><input name="facsimile" type="text" id="facsimile" size="25"></td>
<td width="200">E-Mail:</td>
<td width="200"><input name="email" type="text" id="email" size="50"></td>
<div align="center">
<table width="674" border="1">
<td width="500"><p>I would like to attend the CAB group dinner at The Fort:
<td width="357"><input name="Dinner" type="radio" value="Yes">
<input name="Dinner" type="radio" value="No">
<td><blockquote>If yes &ndash; select a menu option:</blockquote></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">
<input name="Menu" type="radio" value="Chicken">
<td width="500"><p>I would like to attend the tour of the U.S. Denver Mint::
<td width="357"><input name="Tour" type="radio" value="Yes">
<input name="Tour" type="radio" value="No">
<td width="500"><p>I would like my confirmation package sent via:
<td width="357"><input name="Sendoption" type="radio" value="Email">
<input name="Sendoption" type="radio" value="Fax">

<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:pib@fms.treas.gov"><strong>pib@fms.tr eas.gov</strong></a><br>

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



'************************************************* *******************'
' Title : cdosys_form.asp '
' Author : Jennifer Pham '
' Modified by : '
' Date : '
' Main Function: This script is used to send the registration '
'************************************************* *******************'
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("name")
intitle = Request.Form("title")
inagency = Request.Form("agency")
inbureau = Request.Form("bureau")
inaddress = Request.Form("address")
incity = Request.Form("city")
instate = Request.Form("state")
inzip = Request.Form("zip")
intelephone = Request.Form("telephone")
infacsimile = Request.Form("facsimile")
inemail = Request.Form("email")
inDinner = Request.Form("Dinner")
inMenu = Request.Form("Menu")
inTour = Request.Form("Tour")
inSendoption = Request.Form("Sendoption")

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.CreateObject("CDO.Message")
set cabregcon = Server.CreateObject("CDO.Configuration")
Set flds = cabregcon.Fields
cabregcon.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cabregcon.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "dm4.publicdebt.treas.gov"
cabregcon.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
cabregcon.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
cabregcon.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

Set cabreg.Configuration = cabregcon
cabreg.From = inname
cabreg.To = "sfc@fms.treas.gov"
cabreg.Subject = "Denver CAB Registration"
cabreg.TextBody = Inbody
Set cabreg = Nothing
Set cabregcon = Nothing
set flds = Nothing
Response.Write("The e-mail has been sent")
Sep 8 '06 #1
4 5739
Hi ,

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


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".

Sep 14 '06 #2
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.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

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

Sep 20 '06 #3
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...
Sep 22 '06 #4
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
  9. Response.Write("The e-mail has been sent")
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
This will help you.

Oct 31 '06 #5

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

Similar topics

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...
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...
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...
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...
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....
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...
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...
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...
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...
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...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.