Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Catastrophic Error when adding email body

Posted on 2004-04-08
2
Medium Priority
?
250 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 375 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 375 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

715 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