I've written ASP code to send mail using the default SMTP server on a Windows 2000 Server box. My problem is 99.9 percent of the time the mail messages are being sent to each recipient twice. Less than 1 percent of the time a message will get sent only once.
My ASP code is simple (see below). The code gets generated from a subroutine called when the page posts back to itself. The subroutine simply updates a recordset from fields on the form and then runs the mail code below. Has anyone seen this before and perhaps could it be an SMTP problem? If not, could it be that the page is posting back to itself, perhaps running the mail code twice or something?
<%
set objmail = createobject("cdonts.newmail"
objmail.from = “me@mymailserver.com”
objmail.to = “them@theirmailserver.com”
objmail.subject = “this is the subject of your email”
num = “1”
ost = "this is the body of the email. Click on this URL"
url = "objmail.body = ost & url & num
objmail.send
set objmail = nothing
%>
My ASP code is simple (see below). The code gets generated from a subroutine called when the page posts back to itself. The subroutine simply updates a recordset from fields on the form and then runs the mail code below. Has anyone seen this before and perhaps could it be an SMTP problem? If not, could it be that the page is posting back to itself, perhaps running the mail code twice or something?
<%
set objmail = createobject("cdonts.newmail"
objmail.from = “me@mymailserver.com”
objmail.to = “them@theirmailserver.com”
objmail.subject = “this is the subject of your email”
num = “1”
ost = "this is the body of the email. Click on this URL"
url = "objmail.body = ost & url & num
objmail.send
set objmail = nothing
%>