Wrox Programmer Forums
|
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 18th, 2005, 02:28 AM
Registered User
 
Join Date: Jul 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Send E-mail

Hello

I have a form which is saved as a data access page (.html) and in it there is a button which when the user click on it it should perform a certain action. The code is to send the form as an e-mail ,I get and error in the asp code which says Object required'Server', (9058552)

The code is as follows

sub btnsubmit_OnClick

        Dim MyBody
    Dim MyCDONTSMail

        Set MyCDONTSMail =Server.CreateObject("CDONTS.NewMail")
    MyCDONTSMail.From= "[email protected]"
    MyCDONTSMail.To= "[email protected]"
    MyCDONTSMail.Subject="user Request"

    MyBody = "<html>"
        MyBody = MyBody&"<body>"
MyBody = MyBody&"<form method='post'action='localhost/sendemail.asp'>"

MyBody = MyBody&"Date:<input type='textbox' id='txtdate'value="&Request.Form("txtreqdate")&"> <br>"

MyBody = MyBody&"From:<input type='textbox' id='txtfrom' value="&Request.Form("txtfrom")&"> <br>"

MyBody = MyBody&"Name:<input type='textbox' id='txtname'value="&Request.Form("txtname")&"> <br>"

MyBody = MyBody&"Dir/Section:<input type='textbox' id='txtdirsection'value="&Request.Form("txtdirsect ion")&"> <br>"

MyBody = MyBody&"CPR No:<input type='textbox' id='txtcprno'value="&Request.Form("txtcpr")&"> <br>"

MyBody = MyBody&"Telephone No:<input type='textbox' id='txttelno'value="&Request.Form("txttelephone")& "> <br>"

MyBody = MyBody&"Position:<input type='textbox' id='txtposition'value="&Request.Form("txtposition" )&"> <br>"

MyBody = MyBody&"Type of Service:<input type='textbox' id='txttype'value="&Request.Form("selecttype")&" "&Request.Form("txttemptodate")&"> <br>"

MyBody = MyBody&"Body:<input type='textbox' id='rtbbody'value="&Request.Form("txtjustification ")&"><br>"

MyBody = MyBody&"<input type='submit' id='btnapprove' text='Approve'>"
            MyBody = MyBody&"</form>"
            MyBody = MyBody&"</body>"
            MyBody = MyBody&"</html>"


            MyCDONTSMail.Body=MyBody
            MyCDONTSMail.BodyFormat = 0
            MyCDONTSMail.MailFormat = 0
            MyCDONTSMail.Importance = 2

            MyCDONTSMail.Send
            set MyCDONTSMail=nothing
end sub


 
Old July 22nd, 2005, 07:26 AM
Friend of Wrox
 
Join Date: May 2003
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Its simple,

The CDONTS component is not installed on the web server. you need to make it available on the server.

Are you using windows XP professional ??

Charul Shukla
 
Old September 30th, 2005, 12:53 AM
Authorized User
 
Join Date: Aug 2005
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Go to www.webthang.co.uk There is a good guid How to install CDONTS component and how to use it.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
send mail chavakoti BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 1 September 4th, 2007 05:03 AM
How to send mail Jolley_tolson PHP How-To 0 August 13th, 2007 03:38 AM
Cannot send mail rajanikrishna JSP Basics 3 March 17th, 2006 01:39 AM
The mail can't be send jabby General .NET 2 September 8th, 2004 05:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.