Solved

Catastrophic Error when adding email body

Posted on 2004-04-08
2
248 Views
Last Modified: 2008-02-01
Hi folks,

Here's the issue.  We've been using the SMTPsvg.Mailer object to send out emails for quite some time now.  But, it seems that when we execute this now, we get a "catastropic failure" error code when we reach the objNewMail.Subject line...

The problem disappears when the server gets restarted, but it crops up again after intermediate use (ie. 15-20 emails).  My first thought is that there might be a memory leak or something in the object code itself.  Has anybody come across this error before that could help?

Below is the code.  Thanks in advance....

Dan

Function sendHTMLEmail(fromName, fromAddress, toName, toAddress, subject, bodyText)
      Set objNewMail = Server.CreateObject("SMTPsvg.Mailer")
      objNewMail.RemoteHost = 'server ip address goes here
      objNewMail.AddRecipient toName, toAddress
      objNewMail.FromName = fromName
      objNewMail.FromAddress = fromAddress
      objNewMail.Subject = subject
      objNewMail.ContentType = "text/html"
      objNewMail.BodyText = bodyText
      objNewMail.SMTPLog = "e:\websites\common_programming\email.log"
      sendHTMLEmail = objNewMail.SendMail

      Set objNewMail = Nothing
End Function
0
Comment
Question by:dwaldner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Accepted Solution

by:
mouatts earned 125 total points
ID: 10786107
Yep had exactly the same thing.
The problem was caused by somebody mass mailing from the same box.
My ISP actually dealt with the problem so I am short on facts although I beleive that the email had large attachments with them.
HTH
Steve
0
 
LVL 21

Assisted Solution

by:ap_sajith
ap_sajith earned 125 total points
ID: 10795749
I assume that you are doing huge string concatenations to build your Message body. ASP performance is hit badly when large string concatenations are performed. The CPU usage normally ends up at 100%.

"When performing multiple string concatenations, VBScript duplicates the original string and appends the new string at the end of it. Then it replaces the original string with the new one. This can be an incredibly costly maneuver if you are building a very large string."

You could refer either of the two pages and use the code to improve the string concatenation performance issue.

http://www.15seconds.com/howto/pg000929.htm
http://www.eggheadcafe.com/articles/20011227.asp

Hope this helps..
Cheers!!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question