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.
--9B095B5ADSN=_01C83E27410D423600000039SERVERMNAME
Content-Type: text/plain; charset=unicode-1-1-utf-7
This is an automatically generated Delivery Status Notification.
Delivery to the following recipients failed.
myemail@domain.com
--9B095B5ADSN=_01C83E27410D423600000039SERVERMNAME
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
--9B095B5ADSN=_01C83E27410D423600000039SERVERMNAME
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
Message-ID: <SERVERMNAMETbdkSmL00000011@SERVERMNAME>
X-OriginalArrivalTime: 14 Dec 2007 13:55:05.0546 (UTC) FILETIME=[EE42D2A0:01C83E58]
Dear Sir,
This is a new mail
Thank you.
--9B095B5ADSN=_01C83E27410D423600000039SERVERMNAME—
Here is myasp code:
<%
On Error resume Next
Dim TBdy
Dim MyCDO
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)
MyCDO.value("Reply-to")="myemail@domain.com"
MyCDO.Send
Set MyCDO = nothing
Response.Write("Message sent")
Response.Write (MyCDO.Value)
Else
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.