Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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 June 4th, 2006, 05:17 AM
Authorized User
 
Join Date: Dec 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default error when sending mails

hi please i want your help in this:
i have this code:


<%
Set Mail = Server.CreateObject("CDONTS.NewMail")
    Mail.From = "[email protected]"
    Mail.To = Request("[email protected]")
    Mail.Subject = Request("Subject")
    Mail.BodyFormat = 0
    Mail.MailFormat =0
    Mail.Importance =1
    Mail.Body = Request("body")
    mail.Send
    Set objMail = Nothing

    On Error Resume Next
      Mail.Send
    if Err <> 0 Then
    Response.write(err.number )
response.write "There was an error sending the E-mail, E-mail was not sent"
     Else
      Response.Redirect ("mail.asp")
    End If
%>



there is an error trying to send this page and the error number is:
-2147221240

 
Old June 4th, 2006, 08:03 AM
Authorized User
 
Join Date: Jun 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to erobb Send a message via Yahoo to erobb
Default

1. Have you tried hard coding both email addresses?

2. What is the web server you are using? If its windows 2003 the CDONTS is not installed by default, acually I dont think its installed on XP. If this is the case you will either need to grab the CDONT dll's. I wouldnt recommend this since CDONTS is depreciated. If this is the case I recommend you use CDO.

Earl
www.jhdesigninc.com

 
Old June 4th, 2006, 08:05 AM
Authorized User
 
Join Date: Jun 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to erobb Send a message via Yahoo to erobb
Default

DOH

Change
   Mail.To = Request("[email protected]")
TO
   Mail.To = "[email protected]"

earl

 
Old June 4th, 2006, 08:55 AM
Authorized User
 
Join Date: Dec 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

1- actually i am using win 2000 and it supports CDONTS but the error still appearing

2- i've changed mail.to request("") to mail.to "[email protected]" and the smae error appears

 
Old June 12th, 2006, 07:09 PM
Authorized User
 
Join Date: Jun 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to erobb Send a message via Yahoo to erobb
Default

Are you sure your smtp server is configured correctly?

Earl






Similar Threads
Thread Thread Starter Forum Replies Last Post
sending e-mails How To?? saudyonline General .NET 13 November 17th, 2006 01:00 AM
sending mails arabuafef Classic ASP Basics 0 July 18th, 2006 06:29 AM
Sending mails. rupen Javascript How-To 1 October 25th, 2005 07:22 AM
Sending e-mails using C# lily611 General .NET 3 June 30th, 2004 05:46 AM
Sending mails rajeshnerenki Pro VB 6 4 September 25th, 2003 03:34 AM





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