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 SMTP STARTTLS

Download Chilkat Email ActiveX

Demonstrates how to connect to an SMTP server on a normal unsecure channel (using the default port 25) and then convert to an SSL/TLS connection via the STARTTLS command so that the message transmission is secure.

    ' Connect to the SMTP server on unsecure port 25 and then
    ' immediately transform the connection into an SSL/TLS secure channel
    ' via the STARTTLS command.  The SMTP authentication and mail sending
    ' occurs over the secure channel.
    Dim mailman As New ChilkatMailMan2
    mailman.UnlockComponent "test"
    
    mailman.SmtpHost = "smtp.comcast.net"
    mailman.SmtpPort = 25
    mailman.StartTLS = 1
    ' Your SMTP server may or may not require authentication.  If it does not
    ' you may omit the following two lines.
    'mailman.SmtpUsername = "***"
    'mailman.SmtpPassword = "***"
    
    ' Create a simple email for sending.
    Dim email As New ChilkatEmail2
    Call email.AddTo("Chilkat Support", "support@chilkatsoft.com")
    email.FromName = "Matt Fausey"
    email.FromAddress = "fausey@chilkatsoft.com"
    
    email.Subject = "Test email using SMTP STARTTLS."
    email.Body = "Your message transfer is secure by using STARTTLS."
    
    success = mailman.SendEmail(email)
    If (success = 0) Then
        MsgBox mailman.LastErrorText
    Else
        MsgBox "Success!"
    End If

 

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