Visual Basic Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VB 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
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Unicode
Upload
XML
XMP
Zip Compression

More Examples...
Email Object
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA


VB Strings
VB Byte Array

Unreleased...
Bzip2
LZW
Icon

 

 

 

 

 

 

 

Send Bounced Email to Separate Address

Download Chilkat Email ActiveX

This example demonstrates how to create an email such that MDN (message delivery notifications) for bounced email are sent to an email address that is different from the "From" address. This is done by setting the ChilkatEmail2.BounceAddress property.

    ' Create an instance of the mailman for the purpose of unlocking.
    Dim mailman As New ChilkatMailMan2
    mailman.UnlockComponent "Anything for 30-day trial"
    
    ' Create a new email object...
    Dim email As New ChilkatEmail2
    email.Subject = "This is a test"
    email.Body = "This is the mail body"
    email.AddTo "Chilkat Support", "support@chilkatsoft.com"
    ' Email replies will go to sales@chilkatsoft.com
    email.From = "Chilkat Sales <sales@chilkatsoft.com>"
    ' Bounced emails (MDN messages) will get delivered to this email address.
    email.BounceAddress = "admin@chilkatsoft.com"
    
    ' Let's review the MIME...
    MsgBox email.GetMime()
    
    ' We can send the email like this:
    mailman.SmtpHost = "smtp.comcast.net"
    success = mailman.SendEmail(email)
    If (success = 0) Then
        MsgBox mailman.LastErrorText
    Else
        MsgBox "Mail Sent!"
    End If

 

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

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