Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

Very interesting CDOSYS behaviour in .asp page

8:07 pm on Jul 31, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:July 4, 2009
posts: 51
votes: 0

Dear webmasters,

I am experiencing a very interesting cdosys behaviour on my .asp page. It is as follows:

I have an .asp page which sends the changed password information to the e-mail of the customers. It does this with cdosys.
The problem is that the page only sends these e-mails to the customers when the ObjSendMail.To = variable is filled with an e-mail address instead the previously sessioned "Email" variable.
When I put the "Email" variable into the field, (I have sessioned the Email variable before) I get the error:
Error Type:
The event class for this subscription is in an invalid partition
/passchange.asp, line 145

Here is the code:

Else 'Do not take any previous code into consideration this part is just for sessioning and works ok
RecordsetControl("Password") = new_pwd
Fname = RecordsetControl("FirstName")
Lname = RecordsetControl("LastName")
Email = RecordsetControl("Email")
session("FirstName") = FName
session("LastName") = LName
session("Password") = new_pwd
session("Email") = Email


Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")

'This section provides the configuration information for the remote SMTP server.

ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.example.com"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="example@example.com"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="password"


'End remote SMTP server configuration section==

ObjSendMail.To = "Email"
ObjSendMail.Subject = "Your new Example.com password"
ObjSendMail.From = "example@example.com"

ObjSendMail.TextBody = "Dear "& FName &" "& LName &", your new Example.com password is: " & new_pwd & " thank you"


Set ObjSendMail = Nothing


If I enter an e-mail address like ObjSendMail.To = user@example.com instead the "Email" variable, no matter what e-mail it is, it sends the mail without any error.

What might be the reason for giving the above error when not entering an Email address but the Email variable?
Thank you for your considerations.

9:22 pm on July 31, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:July 4, 2009
votes: 0

Sorry folks, I have tried it with just: Email and it worked.