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

1
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="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">
<tr>
<td width="200">Name:</td>
<td width="200"><input name="name" type="text" id="name" size="50"></td>
</tr>
<tr>
<td width="200">Job Title:</td>
<td width="200"><input name="title" type="text" id="title" size="50"></td>
</tr>
<tr>
<td width="200">Department/Agency</td>
<td width="200"><input name="agency" type="text" id="agency" size="50"></td>
</tr>
<tr>
<td width="200">Bureau:</td>
<td width="200"><input name="bureau" type="text" id="bureau" size="50"></td>
</tr>
<tr>
<td width="200">Address:</td>
<td width="200"><input name="address" type="text" id="address" size="50"></td>
</tr>
<tr>
<td width="200">City: </td>
<td width="200"><input name="city" type="text" id="city" size="40"></td>
</tr>
<tr>
<td width="200">State:</td>
<td width="200"><input name="state" type="text" id="state" size="40"></td>
</tr>
<tr>
<td width="150">Zip:</td>
<td width="150"><input name="zip" type="text" id="zip" size="40"></td>
</tr>
<tr>
<td width="150">Telephone:</td>
<td width="150"><input name="telephone" type="text" id="telephone" size="25"></td>
</tr>
<tr>
<td width="150">Facsimile:</td>
<td width="150"><input name="facsimile" type="text" id="facsimile" size="25"></td>
</tr>
<tr>
<td width="200">E-Mail:</td>
<td width="200"><input 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"><input 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"><input 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"><input name="Sendoption" type="radio" value="Email">
E-Mail
<input name="Sendoption" 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:pib@fms.treas.gov"><strong>pib@fms.tr eas.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="VBSCRIPT" 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("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 = "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.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


cabregcon.Configuration.Fields.Update
Set cabreg.Configuration = 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 5739
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
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

Meher
Sep 20 '06 #3
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
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
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...
14
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...
2
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...
24
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...
12
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....
5
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...
8
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...
2
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...
8
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...
9
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...
2
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...
0
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...
0
hi
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...
1
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...
0
Oralloy
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++...
0
BLUEPANDA
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...
1
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...
1
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...
0
DizelArs
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.