Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email
Message
 
 
To
05/01/2007 15:55:49
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Email
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01181838
Message ID:
01183056
Views:
48
>sorry
>Could you send me an example of how i should implement the decoder code in your program to receive email
* Full name of the file with saved email
lcFileName = ...
* The folder where to save attachments
lcSaveDir = ...

loStm = CREATEOBJECT("ADODB.Stream")
loMsg = CREATEOBJECT("CDO.Message")
loStm.Open()
loStm.LoadFromFile(lcFileName)
loDsrc = loMsg.DataSource
loDsrc.OpenObject(loStm, "_Stream")
loStm.Close()

? loMsg.Subject
? loMsg.From
? loMsg.TextBody
? loMsg.HTMLBody
? loMsg.To

FOR i=1 TO loMsg.Attachments.Count
	loAttachment = loMsg.Attachments[i]
	? loAttachment.FileName	
	* Save with the same name
	loAttachment.SaveToFile(ADDBS(lcSaveDir) + loAttachment.FileName)
ENDFOR
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform