Perl Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Perl Examples

Quick Start
Unicode
Byte Array
Bz2
Certificates
CSV
Email
Encryption
FTP
HTML-to-XML
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
Email Object
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Icon

 

 

 

 

 

 

 

Perl to Send Korean Email

Perl script to send Korean email.

Download Perl Programming Example Scripts

# file: SendKoreanEmail.pl

# This source file was saved using the utf-8 character encoding.
use utf8;

# Perl script to send email with Korean characters.

use chilkat;

$mailman = new chilkat::CkMailMan();
$mailman->UnlockComponent('anything for 30-day trial');

# Set the SMTP server hostname
$mailman->put_SmtpHost('smtp.comcast.net');

# If your SMTP server requires a login, set username/password
# $mailman->put_SmtpUsername('myUsername');
# $mailman->put_SmtpPassword('myPassword');

# Create a mail message using Korean characters.
$email = new chilkat::CkEmail();
# Indicate that strings are passed using utf-8
$email->put_Utf8(true);
$email->put_Subject("나는 유리를 먹을 수 있어요. 그래도 아프지 않아요");
$email->put_Body("나는 유리를 먹을 수 있어요. 그래도 아프지 않아요");
$email->put_From('Chilkat Support ');

# Add some recipients
$email->AddTo('Matt','matt@chilkatsoft.com');
$email->AddTo('TagTooga','admin@tagtooga.com');
    
# Chilkat automatically recognizes the Korean characters and chooses
# a typical charset for Korean email: ks_c_5601-1987 (code page 949).
# Had the email contained characters not representable in ks_c_5601-1987 (such as Hebrew 
# characters) the component would have automatically chosen utf-8 as the encoding.

# The charset used throughout the entire email can be explicitly changed by setting
# the Charset property:
# $email->put_Charset("utf-8");
	
# The following line of code is not required for this example.
# It saves the MIME source of the email so it can be reviewed
# in a text editor.
$email->SaveEml("email.eml");
	
$success = $mailman->SendEmail($email);
if (! $success)
    {
	$mailman->SaveLastError('lastError.txt');	
    }


 

Need a specific example? Send a request to support@chilkatsoft.com

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