Solved

Catastrophic Error when adding email body

Posted on 2004-04-08
2
242 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
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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/…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now