FoxPro Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Visual FoxPro Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
Socket
Spider
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Email Object
RSS
Atom
Byte Array
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
FileAccess
Bzip2
LZW
Icon

 

Non-Chilkat Links
Text and String Handling

Read Email in Visual FoxPro

Download Chilkat Email ActiveX

This Visual FoxPro source code example shows how to read POP3 email.

***********************************************************
*** Visual FoxPro to Read Mail from a POP3 Server
***********************************************************

LOCAL loMailMan, loEmail, loBundle, lnSuccess, lcSummary

****************************
*!*	configure POP3 options
****************************
loMailman = CreateObject('Chilkat.MailMan2')
loMailman.UnlockComponent('unlock_code')        

loMailman.MailHost     = 'mail.chilkatsoft.com'      
loMailman.PopUsername = 'matt'        
loMailman.PopPassword = 'myPassword'      

* Read Email from the POP3 Server
* CopyMail copies it from the POP3 server (leaving it there)
* while TransferMail moves it off the POP3 server.
loBundle = loMailman.CopyMail()

* Loop over the emails in the bundle and save each as XML.
FOR i = 0 TO loBundle.MessageCount-1

	loEmail = loBundle.GetEmail(i)
	
	=loEmail.SaveXml("email" + LTRIM(STR(i)) + ".xml")
	
	lcSummary = "From: " + loEmail.From + CHR(13)+CHR(10)
	lcSummary = lcSummary + "Subject: " + loEmail.Subject + CHR(13)+CHR(10)
	lcSummary = lcSummary + "Date: " + DTOS(loEmail.LocalDate) + CHR(13)+CHR(10)
	lcSummary = lcSummary + "Attachments: " + STR(loEmail.NumAttachments) + CHR(13)+CHR(10)
	lcSummary = lcSummary + "Body: " + loEmail.Body
	=MESSAGEBOX(lcSummary)
	
	RELEASE loEmail
	
NEXT


RELEASE loMailman, loBundle

RETURN .T.
******************************************************************************

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2007 Chilkat Software, Inc. All Rights Reserved.

Mail Component · .NET Email Component · ASP Mail Component · XML Parser