CDONTS problem: Some mails sit in the queue, most go through

A

Augustus

Hiya,

Having a problem with CDONTS thats only come up in the last couple of days
here

I'm running IIS5 on a Win2K machine and hosting some websites on it...

The problem: SOME of the outgoing emails generated from the site just sit in
the queue while others go with no problem

The only changes made to any of the sites was that one of our customers
wanted to add paypal integration to his online lunch ordering site... since
its early and things are being tested still I added a small subroutine that
every time PayPal triggers the IPN page the website will automatically email
me the contents of the form object

To do this, I just cut and pasted code from another part of the site that
works fine (its been up and running for almost 2 years with no problems or
bad mail)

This is the subroutine that gets called:

sub EmailMe
' this subroutine will email Me
Dim MyCDONTSMail, strEmail
strEmail="" strEmail="EMAIL TRIGGER: " & vEmailTrigger & vbcrlf &
"RESPONSE TEXT: " & varResponseText & vbcrlf & vbcrlf
for each ppResponse in Request.Form
strEmail=strEmail & ppResponse & "::" & Request.Form(ppResponse) &
vbcrlf
next
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "_____@_____._____"
MyCDONTSMail.To= "_____@_____._____"
MyCDONTSMail.Subject="PayPal IPN Auto Emailer"
MyCDONTSMail.Body= strEMAIL
MyCDONTSMail.Send
set MyCDONTSMail=nothing
end Sub


Like I say... the above code hasn't given us a problem in the past 2 years
and thats the only change we made to the site... and now its starting to
effect other emails being sent from the site

When the mail does eventually end up in BADMAIL it says delivery failed with
the message of:



This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

(e-mail address removed)

--9B095B5ADSN=_01C42C62B99BBCA800000005paperboy
Content-Type: message/delivery-status

Reporting-MTA: dns;paperboy
Received-From-MTA: dns;paperboy
Arrival-Date: Tue, 27 Apr 2004 06:55:38 -0700

Final-Recipient: rfc822;[email protected]
Action: failed
Status: 5.3.5


Any insight would be appreciated

Thanks,
Clint
 
A

Augustus

Augustus said:
Hiya,

Having a problem with CDONTS thats only come up in the last couple of days
here

I'm running IIS5 on a Win2K machine and hosting some websites on it...

The problem: SOME of the outgoing emails generated from the site just sit in
the queue while others go with no problem

A question about my problem:

Could the problem I am having be CDONTS being able to handle only so much at
one time? And if so can I change it?

What I am thinking is: When the paypal form dumps get emailed (see previous
email) its often 2-3 get generated at the same time... is getting 2
messages at once too much for CDONTS to handle?

I changed the code so that instead of emailing me every form dump I am just
writing them to a database and that seems to be clearing up the problem (as
of yet no messages are backing up in the queue)

Any help is appreciated,

Thanks,

Clint
 
A

Augustus

Aaron Bertrand said:
For one, stop using CDONTS... use CDO.Message (see
http://www.aspfaq.com/2026). Use an external SMTP server if possible, then
your web server isn't doubling as a mail server. Two at once should not be
too much to handle. See http://www.aspfaq.com/2268 for some possible
reasons, but switching from CDONTS and using an external SMTP server will
definitely resolve your issue.

Where would be a good source for information on using an external SMTP
server?

I just took a look at a few things on some sites but they all seem to be
indicating using CDO to relay the emails to an external SMTP server...

Is there a point to that? I mean, why not just send them with CDO directly
in the first place? Or can you send them from the site directly to the SMTP
server?

My web server is also my email server (running Kerio) would I have any
problems with doing anything like this? Or should I put the mail server on
its own machine to accomodate this?

Thanks,

Clint
 
A

Aaron Bertrand [MVP]

Where would be a good source for information on using an external SMTP

The site for the vendor of the SMTP server? I don't know what kind of
information you're looking for, you'll have to be more specific. Maybe you
mean CDO syntax? http://www.aspfaq.com/2339 (The alternative is
cdoSendUsingPickup.)
I just took a look at a few things on some sites but they all seem to be
indicating using CDO to relay the emails to an external SMTP server...

One of the advantages of using CDO over CDONTS is that with one single
change to the code, you can switch from using the local SMTP service to
using a remote SMTP server. The problem I've found with using the local
SMTP service is that there are far too many variables that can leave mail
hanging out in the queue. If you have a remote server (and remote *can*
mean localhost, especially if it's running something like Kerio instead of
the standard SMTPl service) that is already servicing SMTP for other
clients/applications, adding these mails to its task should be seamless.
 
A

Augustus

Augustus said:
Having a problem with CDONTS thats only come up in the last couple of days
here

The problem: SOME of the outgoing emails generated from the site just sit in
the queue while others go with no problem

Well I finally figured out the problem I was having...

I am running Kerio Mail Server on the same machine that I am hosting the
websites on. We've been getting alot of virus emails going through the
system lately so I set everybody up to a limit of 20 outgoing emails per
account per hour.

When I logged in to Kerio to clear the mail queue of any virus infected
emails, I went over the logs and saw that Kerio was also applying its limit
of 20 per hour to the SMTP server in IIS as well

I created a new ASP and tried sending 30 emails with a FOR...NEXT loop and
sure enough 10 were left in the queue and any new ones I created just sat
there adding to the queue. When I removed the restriction from Kerio the
SMTP queue cleared out and when I reran the ASP page all 30 emails went
through right away.

Thanks for the help and advice... I will switch all my code over shortly to
use CDO as well, instead of CDONTS. Thanks for pointing that out to me

Clint
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,034
Messages
2,570,356
Members
47,002
Latest member
RobertoLip

Latest Threads

Top