Visual Basic Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB Examples

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

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
Bzip2
PPMD
Deflate
LZW


VB Strings
VB Byte Array

 

 

 

 

 

 

 

Send Email with Progress Monitoring

Download Chilkat Email ActiveX

Demonstrates how to use event callbacks to send email in Visual Basic 6.0 using the Chilkat email component. The callbacks include an abort flag which can be set to force the mail sending to abort.

' When using events, you must declare the mailman "withevents"
Public WithEvents mailman As ChilkatMailMan2

Private Sub Command1_Click()
    
    mailman.SmtpHost = "smtp.comcast.net"
    
    Dim email As New ChilkatEmail2
    email.Subject = "This is a test"
    email.From = "admin@chilkatsoft.com"
    email.AddTo "Support", "support@chilkatsoft.com"
    email.Body = "This is a test"
    email.AddFileAttachment "dude.gif"
    
    mailman.SendEmail email
    
    MsgBox mailman.LastErrorText
    
End Sub

Private Sub Form_Load()
    Set mailman = New ChilkatMailMan2
    mailman.UnlockComponent "Anything for 30-day trial"
    ProgressBar1.Value = 0
End Sub

' This is the event callback that updates the progress bar with the percentage done.
Private Sub mailman_SendPercentDone(ByVal percentDone As Long, abort As Long)
    ProgressBar1.Value = percentDone
End Sub

' Abort check is called at intervals when too much time elapses between "percent done" updates.
' This would happen when sending large emails.
Private Sub mailman_AbortCheck(abort As Long)
    ' Set abort = 1 if you wish to abort.
End Sub

 

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