Hello All,
I am new to the world of CDO.
What are the advantages of using CDONTS over simply creating a text file
with the filesystemobject?
This site will not generate very many messages, but another one I am working
on will.
Here is a sample of what I am talking about. My site has a custom 404 error
page. All it really does is just gives the user a way to navigate back to
the site. In addition, it sends me an automated email stating where the
error occured and when.
ASP Script:
<%
'Send an Error Message to the Webmaster Account
Dim sSendInfo, fs, sBody, msg
'Send to who
sSendInfo = "x-sender: webmaster@c..."
sSendInfo = sSendInfo & vbcrlf & "x-receiver:
webmaster@c..."
sSendInfo = sSendInfo & vbcrlf & "From: webmaster@c..."
sSendInfo = sSendInfo & vbcrlf & "To: webmaster@c..."
sSendInfo = sSendInfo & vbcrlf & "Subject: CHSInternational Auto Error
Message"
'Body of message: Details
sBody = sBody & vbcrlf & "Date of Error: " & Date()
sBody = sBody & vbcrlf & "Requested URL: " & Request.QueryString
sBody = sBody & vbcrlf & "IP Address: " &
Request.ServerVariables("REMOTE_ADDR")
sBody = sBody & vbcrlf & "Domaine Name: " &
Request.ServerVariables("REMOTE_HOST")
Set fs = CreateObject("Scripting.FileSystemObject")
Set msg = fs.CreateTextFile("C:\InetPub\mailroot\pickup\message.txt", True)
msg.WriteLine sSendInfo
msg.WriteBlankLines(1)
msg.WriteLine sBody
msg.Close
Set fs = Nothing
Set msg = Nothing
%>
On another site I have I use ASPMail. I haven't had any problems but the
site at them moment does not generate much usage.
I guess what I am trying to say is, what is the best way to send SMTP mail
via ASP? (CDONTS, FileSystemObject, or 3rd Party).
Thanks,
Scott