ASP Mail Error: The event class for this subscription is in an invalid partition

Posted by JFV on Stack Overflow See other posts from Stack Overflow or by JFV
Published on 2010-06-09T15:28:07Z Indexed on 2010/06/09 23:52 UTC
Read the original article Hit count: 441

Filed under:
|
|
|

I have some ASP code that I've "inherited" from my predecessor (no, it's not an option to update it at this time...It would take an act of not only Congress, but every other foreign country too) and I'm having an issue sending mail on one of the pages. It is an almost identical code snippet from the other page, but this one throws an error when I try to 'Send'.

Code below:

Set myMail=CreateObject("CDO.Message")
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2

'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="localhost"

'Server port
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 
myMail.Configuration.Fields.Update

myMail.Subject="Subject"
myMail.From=from_email
myMail.To=email
myMail.TextBody= "Body Text of message"
myMail.Send

The error thrown is: Error Type: (0x8004020F) The event class for this subscription is in an invalid partition

I'd appreciate any and all help!!!

Thanks! JFV

© Stack Overflow or respective owner

Related posts about email

Related posts about asp-classic