Visual Basic Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



VB 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
Unicode
Upload
XML
XMP
Zip Compression

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor


VB Strings
VB Byte Array

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

 

S/MIME Encrypt with Certificate from File (.cer)

Download Visual Basic Project Files and Source Code

S/MIME encrypts a message using a .cer file.

' Encrypts any kind of file into an S/MIME encrypted message.
Private Sub Command1_Click()

        Dim mime As New ChilkatMime

        ' Get a 30-day trial code from http:'www.chilkatsoft.com/register30.asp
        mime.UnlockComponent "UnlockCode"
        mime.SetBodyFromPlainText "This is a message containing a GIF image file."
        mime.AppendPartFromFile "dude.gif"
        mime.SaveMime "unencrypted.txt"
        
        Dim cert As New ChilkatCert
        cert.LoadFromFile "matt.cer"
        
        ' Use the certificate for encryption.
        ' This creates an encrypted S/MIME message.
        mime.Encrypt cert
        mime.SaveMime "encrypted.txt"

End Sub

 

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

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