469,609 Members | 2,243 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

CDONTS create object but mail not sent

Im trying to post from a form to send an email, im using CDONTS ( I have to as it will be running on NT4), the object appears to get created fine, however the email is not sending, its generates 3 files in the C:\Inetpub\mailroot\Badmail directory they are .BDR, .BDP & .BAD files, here is the text of the .bad:

From: postmaster@SERVERMNAME
To: myemail@domain.com
Date: Fri, 14 Dec 2007 13:55:07 +0000
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="9B095B5ADSN=_01C83E27410D423600000039SER VERMNAME"
Message-ID: <Aztxc1o8y0000001d@SERVERMNAME>
Subject: Delivery Status Notification (Failure)

This is a MIME-formatted message.
Portions of this message may be unreadable without a MIME-capable mail program.

Content-Type: text/plain; charset=unicode-1-1-utf-7

This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.


Content-Type: message/delivery-status

Reporting-MTA: dns;SERVERMNAME
Received-From-MTA: dns;SERVERMNAME
Arrival-Date: Fri, 14 Dec 2007 13:55:05 +0000

Final-Recipient: rfc822;myemail@domain.com
Action: failed
Status: 5.0.0

Content-Type: message/rfc822

Received: from mail pickup service by SERVERMNAME with Microsoft SMTPSVC;
Fri, 14 Dec 2007 13:55:05 +0000
Reply-To: <myemail@domain.com>
From: <myemail@domain.com>
To: <myemail@domain.com>
Subject: Subject of the message
Date: Fri, 14 Dec 2007 13:55:05 -0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-OriginalArrivalTime: 14 Dec 2007 13:55:05.0546 (UTC) FILETIME=[EE42D2A0:01C83E58]

Dear Sir,

This is a new mail
Thank you.


Here is myasp code:
On Error resume Next
Dim TBdy
CR = Chr(13)
Set MyCDO = Server.CreateObject("CDONTS.NewMail")
If IsObject (MyCDO) Then
MyCDO.From = "myemail@domain.com"
MyCDO.To = "myemail@domain.com"
MyCDO.Subject = "Subject of the message"
TBdy = "Dear Sir," & CR & CR & "This is a new mail" & CR
TBdy = TBdy & "Thank you."
MyCDO.Body = TBdy
MyCDO.Importance = 2 (High)
Set MyCDO = nothing
Response.Write("Message sent")
Response.Write (MyCDO.Value)
Response.Write("Message not sent")
End If

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

any help would be grateful.
Dec 14 '07 #1
2 2493
164 Expert 100+
-- edited: I had an answer, but it turned out to be wrong --
Dec 14 '07 #2
533 Expert 512MB
Hi Hughesie,

One of the experts asked me to take a look over this one.

If you remove the On Error Resume Next, and run the script again, what happens?
Also, what mail server are you using (Windows POP3/SMTP, Exchange Server etc.)?

Best regards,

Dec 17 '07 #3

Post your reply

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

Similar topics

3 posts views Thread by Guillaume Hanique | last post: by
4 posts views Thread by Steve | last post: by
6 posts views Thread by George Viveiros | last post: by
2 posts views Thread by Marty | last post: by
2 posts views Thread by microsoft.public.dotnet.languages.csharp | last post: by
reply views Thread by Solution2021 | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.