dwaldner
asked on
Catastrophic Error when adding email body
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("SMTPs vg.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_progra mming\emai l.log"
sendHTMLEmail = objNewMail.SendMail
Set objNewMail = Nothing
End Function
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("SMTPs
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_progra
sendHTMLEmail = objNewMail.SendMail
Set objNewMail = Nothing
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.