Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. 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 Professional 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 December 14th, 2007, 08:37 AM
Authorized User
 
Join Date: Nov 2007
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Hughesie78
Default asp CDONTS not sending.

Having an issue with cdonts. I have a page taking in into and creates and sends an email. I am developing on a Winxp machine, but the live version is going onto a Nt4 box (sad I know!)
Anyhow, I am using CDONTS as I know Nt doesn’t use CDOSYS and .net is out of the question.
My problem is that my code appears to work, cdonts creates the object fine but now email is sent, I think I may have some sort of issue with the smtp setup, iget this message in the .BDR file:

Unable to deliver this message because the follow error was encountered: "This message is a delivery status notification that cannot be delivered.".

The specific error code was 0xC00402C7.


The message sender was <>.


The message was intended for the following recipients.
    [email protected]









Asp:
<%@ LANGUAGE="VBSCRIPT" %>
      <HTML>
      <HEAD>
      <META NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0">
      <META HTTP-EQUIV="Content-Type"
       content="text/html;charset=iso-8859-1">
      <TITLE>CDONTSMail</TITLE>

      <%
      Sub Write(strWriteThis)
         'This subroutine just writes out whatever is
         'passed to it.
         response.write(strWriteThis & "<br>")
      end sub

      %>
      </HEAD>
      <BODY>

      <%
         Dim myCDONTSMail
         Dim strFrom
         Dim strTo
         Dim strSubject
         Dim strMessage
         Dim lngImportance

         'The following variable assignments are not required
         'they are just here to make interpretation of the
         'myCDONTSMail.Send line easier. You could put the
         'Request.Form statements in the .Send line to cut down
         'on the amount of code in the file.
         strFrom=request.form("txtFrom")
         strTo=request.form("txtTo")
         strSubject = request.form("txtSubject")
         strBody=request.form("txtMessage")
         lngImportance = request.form("optImportance")

         'The following four lines of code are just here for test
         'purposes to see what variables have been pulled in from the
         'HTM form.
         Write("strFrom = " & strFrom)
         Write("strTo = " & strTo)
         Write("strSubject = " & strSubject)
         Write("strMessage = " & strBody)
         Write("Importance = " & lngImportance)

         Set myCDONTSMail = CreateObject("CDONTS.NewMail")



         myCDONTSMail.Send strFrom,strTo,strSubject,strBody,lngImportance

         Set myCDONTSMail = Nothing
         response.Write "Mail has been sent."
         %>

         Mail sent..
      </BODY>
      </HTML>
__________________
Thank You





Similar Threads
Thread Thread Starter Forum Replies Last Post
sending .CSS with CDONTS. pushpa Classic ASP Basics 1 March 23rd, 2007 07:01 AM
CDONTS ASP Mail Code egerdj Classic ASP Basics 0 February 19th, 2004 10:25 PM
Sending both text mail and HTML mail - CDONTS madhukp Classic ASP Basics 1 October 8th, 2003 01:05 AM





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