Simply you can use the code like:
objsession = CREATEOBJECT("mapi.session")
objsession.logon("login_name")&& for outlook login
objmessage = objsession.outbox.MESSAGES.ADD
objmessage.subject = "Your subject here"
objmessage.TEXT = "Text Body Here"
objmessage.attachments.ADD((ALLTRIM(cfilename)), 0, 1,(ALLTRIM(cfilepath)))
objrecip = objmessage.recipients.ADD("your_recipient")
objrecip.resolve
objmessage.SEND
objsession.logoff
RELEASE objrecip, objmessage, objsession
>Hi,
>
>How can I provide an e-mail feature in one application? I want something simple to use, tried to use the VFP foundation classes but it is too complicated.
>
>I was thinking about something simple as :
>
>oEMail.Compose()
>oEMail.To = "
you@yourwork.com"
>oEMail.From = "
me@mywork.com"
>oEMail.Subject = "VFP is the BEST!"
>oEmail.Message = ".........."
>
>oEmail.Send()
>
>
>Anybody help, please.
>
>TIA
>
>Alonso
Jeff Pearce