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

 

 

 

 

 

 

 

Using SendMime to Specify a SMTP FROM Different than the FROM MIME Header Field

Download Chilkat Email ActiveX

Demonstrates how to call SendMime so that the FROM address in the MIME header may be different than the FROM address passed to the SMTP server during the SMTP protocol conversation.

    Dim mailman As New ChilkatMailMan2
    mailman.UnlockComponent "test"
    
    mailman.SmtpHost = "smtp.comcast.net"
    
    Dim email As New ChilkatEmail2
    email.Subject = "test email from Chilkat"
    email.Body = "this is a test for our customer"
    email.AddTo "Matt Fausey", "admin@chilkatsoft.com"
    email.AddFileAttachment "fw9.pdf"
    
    ' If we send the email by calling mailman.SendEmail, this is
    ' the FROM address that is in the MIME header of the email,
    ' as well as the FROM address passed to the SMTP server
    ' as part of the SMTP protocol.
    email.FromName = "Chilkat Support"
    email.FromAddress = "support@chilkatsoft.com"
    
    ' In this example, we'll send the email by calling mailman.SendMime
    ' This allows us to provide recipients and a "From" address that may
    ' be different than what is in the MIME header of the email.
    Dim mime As String
    mime = email.GetMime()
    
    Dim recipientList As String
    Dim smtpFrom As String
    smtpFrom = "joe@mycompany.com"
    recipientList = "admin@chilkatsoft.com, support@chilkatsoft.com"
    success = mailman.SendMime(smtpFrom, recipientList, mime)
    If (success = 0) Then
        MsgBox mailman.LastErrorText
    End If

 

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

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