FoxPro Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Visual FoxPro Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Byte Array
Service
PPMD
Deflate
DH Key Exchange
DSA
SSH Key
SSH
SSH Tunnel
SFTP

Unreleased...
Bzip2
LZW
Bz2
Icon

 

Non-Chilkat Links
Text and String Handling

Convert Web Page to HTML Email and Send

Download Chilkat Email ActiveX

Download Chilkat MHT ActiveX

This FoxPro sample code downloads and converts a web page to HTML mail and sends it.

***********************************************************
*** Chilkat MHT: FoxPro to convert a web page into HTML email and send it.
*** NOTE: This example requires licenses to both Chilkat Mail and Chilkat MHT.
***********************************************************

LOCAL loMailMan, loEmail, lnSuccess


********************************************************************
*!*	object loMailman (ChilkatMailMan) manages pop3 / smtp configuration
*!*	and sending and receiving email
********************************************************************
*!*	object loEMail (ChilkatEmail) represents an email
********************************************************************
*!*	object loMht (ChilkatMht) converts a web page into an email object.
********************************************************************

loMht = CreateObject('Chilkat.Mht')
loMht.UnlockComponent('mhtUnlockCode')        && Unlocks the mht object

loMailman = CreateObject('Chilkat.MailMan2')
loMailman.UnlockComponent('mailUnlockCode')        && Unlocks the mailman object

*The hostname of the SMTP server used to send email
loMailman.SmtpHost     = 'smtp.earthlink.net'

****************************
*!*	create the email
****************************
loEmail         = loMht.GetEmail("http://www.google.com")
loEmail.AddTo   ( "Chilkat Support", "support@chilkatsoft.com")           && Adds a recipient to the "to" list
loEmail.Subject = "This is the Google home page"           && The subject of the email
loEmail.FromName    = 'Matt'
loEmail.FromAddress = "matt@chilkatsoft.com" 

*Send an email. If mail was not successfully sent to any recipients, then an error is raised
lnSuccess = loMailman.SendEmail(loEmail) 

*!*	Nobody got the email: Function returns 0 and error is raised. 
*!*	Everybody got the email: Function returns 1. 
*!*	Some, but not everyone, got the email: Function returns 0, but error is not raised.

IF ( lnSuccess = 1 )
	=MESSAGEBOX('The mail was sent succesfully',0+64,'Chilkat send email')
ENDIF

******************************************************************************
* Releasing objects
******************************************************************************
RELEASE loMailman, loEmail, loMht

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