I copied code:
LOCAL loCDOMSG AS CDO.MESSAGE
loCDOMSG = NEWOBJECT( 'cdo.message' )

WITH loCDOMSG
.Subject = 'Test CDOSYS Message'
.TO = 'Joe@somecompany.com'
.FROM = 'joe@somecompany.com'
.TextBody = 'This is the body'

.Configuration.FIELDS.ITEM([http://schemas.microsoft.com/cdo/configuration/s
endusing]) = 2

.Configuration.FIELDS.ITEM([http://schemas.microsoft.com/cdo/configuration/s
mtpserver]) = [SMTPHOST]

.Configuration.FIELDS.ITEM([http://schemas.microsoft.com/cdo/configuration/s
mtpserverport]) = 25
.FIELDS([urn:schemas:httpmail:importance]) = 2
.FIELDS([urn:schemas:mailheader:priority]) = 1
.Configuration.FIELDS.UPDATE
.FIELDS.UPDATE
.SEND
ENDWITH

loCDOMSG = NULL
WAIT WINDOW [Mail Sent.] TIMEOUT 1

?But how to attach a file
thanks

Re: attachments in cdo by Cat

Cat
Mon Mar 27 15:46:36 CST 2006

This works for me to attach one or multiple documents.

if file(lcAttachDoc1)
oCdoMSG.AddAttachment(lcAttachDoc1)
endif
if file(lcAttachDoc2)
oCdoMSG.AddAttachment(lcAttachDoc2)
endif

Cat

"sherry" <sherry@discussions.microsoft.com> wrote in message
news:854E8285-8DCE-4FE7-A9C8-1118E911D8D7@microsoft.com...
>I copied code:
> LOCAL loCDOMSG AS CDO.MESSAGE
> loCDOMSG = NEWOBJECT( 'cdo.message' )
>
> WITH loCDOMSG
> .Subject = 'Test CDOSYS Message'
> .TO = 'Joe@somecompany.com'
> .FROM = 'joe@somecompany.com'
> .TextBody = 'This is the body'
>
> .Configuration.FIELDS.ITEM([http://schemas.microsoft.com/cdo/configuration/s
> endusing]) = 2
>
> .Configuration.FIELDS.ITEM([http://schemas.microsoft.com/cdo/configuration/s
> mtpserver]) = [SMTPHOST]
>
> .Configuration.FIELDS.ITEM([http://schemas.microsoft.com/cdo/configuration/s
> mtpserverport]) = 25
> .FIELDS([urn:schemas:httpmail:importance]) = 2
> .FIELDS([urn:schemas:mailheader:priority]) = 1
> .Configuration.FIELDS.UPDATE
> .FIELDS.UPDATE
> .SEND
> ENDWITH
>
> loCDOMSG = NULL
> WAIT WINDOW [Mail Sent.] TIMEOUT 1
>
> ?But how to attach a file
> thanks



RE: attachments in cdo by Leemi

Leemi
Mon Mar 27 16:49:11 CST 2006

Hi Sherry:

Take a look at the code example in this article:

175052 HOWTO: Send a Message in Visual FoxPro Using Active Messaging
http://support.microsoft.com/default.aspx?scid=kb;EN-US;175052

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/

*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003

>I copied code:
> LOCAL loCDOMSG AS CDO.MESSAGE
> loCDOMSG = NEWOBJECT( 'cdo.message' )
>
> WITH loCDOMSG
> .Subject = 'Test CDOSYS Message'
> .TO = 'Joe@somecompany.com'
> .FROM = 'joe@somecompany.com'
> .TextBody = 'This is the body'
>
>
Configuration.FIELDS.ITEM([http://schemas.microsoft.com/cdo/configuration/s
> endusing]) = 2
>
>
Configuration.FIELDS.ITEM([http://schemas.microsoft.com/cdo/configuration/s
> mtpserver]) = [SMTPHOST]
>
>
Configuration.FIELDS.ITEM([http://schemas.microsoft.com/cdo/configuration/s
> mtpserverport]) = 25
> .FIELDS([urn:schemas:httpmail:importance]) = 2
> .FIELDS([urn:schemas:mailheader:priority]) = 1
> .Configuration.FIELDS.UPDATE
> .FIELDS.UPDATE
> .SEND
> ENDWITH
>
> loCDOMSG = NULL
> WAIT WINDOW [Mail Sent.] TIMEOUT 1
>
> ?But how to attach a file
> thanks