Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CDO Stopped Working
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01026265
Message ID:
01026300
Views:
21
I found the link on MSDN for cdonts but the following two lines return: "Class definition CDONTS.NEWMAIL is not found."

oMSG = CREATEOBJECT("CDONTS.NewMail")
oMSG = NEWOBJECT("CDONTS.NewMail")

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_denali_newmail_object_cdonts_library_.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/exchanchor/htms/msexchsvr_cdo_top.asp


>Hi Tracy,
>
>Three suggestions:
>1) Try creating the CDONTS.NewMail object instead of the CDO.Message object.
>2) Instead of the TextBody property, use the Body property
>3) Instead of the AddAttachment() method, use the AttachFile() method
>
>I'm curious how this works out -- please keep us informed (g).
>
>>This worked for quite sometime, and now it has stopped working and I do not know why. No error message appears and the object oMSG is valid. The code runs each line as it should but the messages appear to be lost in la la land. I am concerned because I have no idea what made it stop successfully sending messages.
>>
>>I know that it requires winsock2 but that should not be a problem on Windows 2000 or Windows XP systems.
>>
>>In my testing, I have Windows XP Pro SP2. It quit working in VFP8 and VFP9 on my system during testing.
>>
>>
>>*--Each line runs as it should - no error messages but messages are never received
>>oMSG = CREATEOBJECT("CDO.Message")
>>IF TYPE('oMSG') = "O" .AND. !ISNULL(oMSG)
>>   oMSG.TO = "myemail.hotmail.com" && tested with valid email addresses
>>   oMSG.FROM = "me@mywork.com"
>>   oMSG.TextBody = "Error Report"
>>   oMSG.Subject = "Error Report Test"
>>*   oMSG.AddAttachment("\errors.txt")
>>   oMSG.SEND()
>>ENDIF
>>oMSG = NULL
>>RELEASE oMSG
>>
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform