Solved

Catastrophic Error when adding email body

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

910 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

23 Experts available now in Live!

Get 1:1 Help Now