Visual Basic Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Delphi ActiveXDelphi DLLVisual FoxProJavaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerShellPythonRubySQL ServerUnicode CUnicode C++Visual Basic 6.0VB.NETVBScript

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

 

 

 

 

 

 

 

Email Body - Plain Text and/or HTML

Any given email may have a plain-text body, an HTML body, or both. The Body property will return the HTML body by default (if it exists) otherwise it will return the plain-text body. There are methods for checking to see if an email has a particular body (HasPlainTextBody and HasHtmlBody) and there are methods for getting a specific body: GetHtmlBody, GetPlainTextBody.

Dim email As New ChilkatEmail2

'  Load an email from a .eml
Dim success As Long
success = email.LoadEml("something.eml")
If (success <> 1) Then
    MsgBox email.LastErrorText
    Exit Sub
End If

'  Display the default Body:
Text1.Text = Text1.Text & email.Body & vbCrLf

'  If a plain-text body is present, display it:
Dim bText As Long
bText = email.HasPlainTextBody()
If (bText) Then
    Text1.Text = Text1.Text & email.GetPlainTextBody() & vbCrLf
End If

'  If an HTML body is present, display the HTML source:
Dim bHtml As Long
bHtml = email.HasHtmlBody()
If (bHtml) Then
    Text1.Text = Text1.Text & email.GetHtmlBody() & vbCrLf
End If

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