My software send emails without problem, but I'd to read emails from outlook
express and save attachments in a especific place.

Is it possible ??

I'm using VFP6 and outlook 6

For all windows 95,98,Xp ...

Thanks

Alberto

Re: receiving email by Eric

Eric
Fri Oct 22 14:59:28 CDT 2004

Yes you can do this with VFP and the MAPI controls. Here's a small snippet
to get the idea.

FOR lnCount = 1 TO MAPIMessage.attachmentcount
MAPIMessage.attachmentindex = lnCount - 1
lcFile = MAPIMessage.attachmentpathname
lcNewFile = "c:\attachments\" + JUSTFNAME(lcFile)
COPY FILE (lcFile) TO (lcNewFile)
ENDFOR

--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Re: receiving email by alkots

alkots
Mon Oct 25 08:37:03 CDT 2004

thanks eric

but I need one thing more

I need filter the subject using a key word, saving only for that are ok

could you help again

alberto

"Eric den Doop" wrote:

> Yes you can do this with VFP and the MAPI controls. Here's a small snippet
> to get the idea.
>
> FOR lnCount = 1 TO MAPIMessage.attachmentcount
> MAPIMessage.attachmentindex = lnCount - 1
> lcFile = MAPIMessage.attachmentpathname
> lcNewFile = "c:\attachments\" + JUSTFNAME(lcFile)
> COPY FILE (lcFile) TO (lcNewFile)
> ENDFOR
>
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
>
>
>

Re: receiving email by Eric

Eric
Mon Oct 25 09:00:06 CDT 2004

Hello, alkots!
You wrote on Mon, 25 Oct 2004 06:37:03 -0700:

a> but I need one thing more
a> I need filter the subject using a key word, saving only for that are ok

There's a Subject property on the MAPIMessage class:

IF "keyword" $ MAPIMessage.subject
FOR lnCount = 1 TO MAPIMessage.attachmentcount
* .... save attachments here
ENDFOR
ELSE
* skip
ENDIF
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8