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

 

 

 

 

 

 

 

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

 

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