Catastrophic Error when adding email body
Posted on 2004-04-08
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....
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