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>