Perl Examples

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

Perl Examples

Quick Start
Unicode
Byte Array
Bz2
Certificates
CSV
Email
Encryption
FTP
HTML Conversion
HTTP
IMAP
MHT
MIME
POP3
RSA
S/MIME
Signatures
SMTP
Socket / SSL
Spider
SFTP
SSH Key
SSH
SSH Tunnel
Tar
HTTP Upload
XML
XMP
Zip

More Examples...
String
Amazon S3
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

 

MIME Encodings - Base64, Quoted-Printable, 8bit

 Chilkat Perl Module Downloads for Windows, Linux, and MAC OS X

Perl sample script showing how to create MIME using different encoding schemes.

# file: mimeEncodings.pl
# Perl MIME parsing script / create MIME in Perl.

use chilkat;

# Demonstrates how to use different content-transfer-encodings
# such as quoted-printable, base64, and 8bit.
$mime = new chilkat::CkMime();
$mime->UnlockComponent("anything for 30-day trial");

$mime->put_Charset("iso-8859-1");
# Begin with 8bit.
$mime->put_Encoding("8bit");
		
# Add some Danish text...
$mime->SetBodyFromPlainText("Jeg kan spise glas, det gør ikke ondt på mig.");
		    		
print $mime->mime() . "\n\n";
		    
#  This MIME is created:
# 		
# content-transfer-encoding: 8bit
# content-type: text/plain;
# 	 charset="iso-8859-1"
# 
# Jeg kan spise glas, det gør ikke ondt på mig.

		
# Change the encoding to base64:
$mime->put_Encoding("base64");
print $mime->mime() . "\n\n";
		
#  The MIME is now in base64 format:
# 		
# content-type: text/plain;
# 	 charset="iso-8859-1"
# content-transfer-encoding: base64
# 
# SmVnIGthbiBzcGlzZSBnbGFzLCBkZXQgZ/hyIGlra2Ugb25kdCBw5SBtaWcu

		
# Change the encoding to quoted-printable:
$mime->put_Encoding("quoted-printable");
print $mime->mime() . "\n\n";
		
#  The MIME is now in quoted-printable format:
# 		
# content-type: text/plain;
# 	 charset="iso-8859-1"
# content-transfer-encoding: quoted-printable
# 
# Jeg kan spise glas, det g=F8r ikke ondt p=E5 mig.


		






 

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