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"
> 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
>
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN
If a vegetarian eats vegetables, what does a humanitarian eat?