VBScript Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VBScript Examples

Bounced Mail
Bz2
Character Encoding
Digital Certificates
CSV
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
PFX
RSA
S/MIME
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
FileAccess
Byte Array
RSS
Atom
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

 

MIME SetBody

Set the body text of a MIME message via the SetBody method.

Download Chilkat MIME ActiveX

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)

set mime = CreateObject("Chilkat.Mime")

success = mime.UnlockComponent("Anything for 30-day trial.")
If (success = 0) Then
    outFile.WriteLine(mime.LastErrorText)
    WScript.Quit
End If

'  Add a few header fields:
mime.AddHeaderField "Content-Type","text/plain"
mime.AddHeaderField "Subject","this is a test"

'  Set the body text content via SetBody.
'  (Other methods such as SetBodyFromPlainText, or SetBodyFromFile
'  will also automatically set the Content-Type header based
'  on the type of content.  The SetBody method does not
'  alter the MIME header.)
mime.SetBody "This is the body text..."

outFile.WriteLine(mime.GetMime())

'  The MIME should look like this:
'  
Content-Type: text/plain
Subject: this is a test

This is the body text...

outFile.Close

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

Mail Component · XML Parser