Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicPythonRubySQL ServerSwiftTclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.js

Visual Basic 6.0 Examples

Async
Certificates
ECC
Email Object
Encryption
FTP
HTML-to-XML/Text
Gzip
HTTP
IMAP
JSON
MHT / HTML Email
PEM
PFX/P12
Java KeyStore (JKS)
POP3
RSA Encryption
MIME
REST
SCP
SMTP
Socket/SSL/TLS
SSH Key
SSH
SFTP
Stream
Tar Archive
XML
XMP
Zip

More Examples...
Google APIs
Google Cloud Storage
Azure Cloud Storage
Amazon S3 (new)
Google Drive
ASN.1
PRNG
Amazon S3
Bounced Email
CSV
Diffie-Hellman
DKIM / DomainKey
DSA
NTLM
QuickBooks

 

 

 

 

 

 

 

(Visual Basic 6.0) 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.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Dim email As New ChilkatEmail

'  Load an email from a .eml
Dim success As Long
success = email.LoadEml("something.eml")
If (success <> 1) Then
    Text1.Text = Text1.Text & email.LastErrorText & vbCrLf
    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-2016 Chilkat Software, Inc. All Rights Reserved.