Perl Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Perl Examples

Quick Start
Perl Unicode
Perl Byte Array
Perl Certs
Perl Email
Perl Encryption
Perl FTP
HTML-to-XML
Perl HTTP
Perl IMAP
Perl MHT
Perl MIME
Perl RSA
Perl S/MIME
Perl Signatures
Perl Socket
Perl Spider
Perl Tar
Perl Upload
Perl XML
Perl XMP
Perl Zip

More Examples...
String
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

 

High-Priority Email

Perl script to send email marked as high-priority.

Download Perl Programming Example Scripts

# file: EmailPriority.pl

use chilkat;

# Demonstrates how to send high-priority e-mail
# Setting the priority of an email is simply a matter
# of setting the X-Priority header field.
# Values of 1 through 5 are acceptable, with 1 being the
# highest priority, 3 = normal, and 5 = lowest priority.
$mailman = new chilkat::CkMailMan();
$mailman->UnlockComponent('anything for 30-day trial');

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

# If your SMTP server requires a authentication, set username/password
# $mailman->put_SmtpUsername("***");
# $mailman->put_SmtpPassword("***");

# Create an e-mail object
$email = new chilkat::CkEmail();
# Set the email's priority to high:
$email->AddHeaderField("X-Priority","1");

$email->put_Subject("How to send high priority email in the Perl programming language");
$email->put_Body("High priority email sent from a Perl script");
$email->put_From('Chilkat Support <support@chilkatsoft.com>');

# Add a few recipients...
$email->AddTo("Matt",'matt@chilkatsoft.com');
$email->AddTo("TagTooga",'admin@tagtooga.com');

# Send the email
$success = $mailman->SendEmail($email);
if (! $success)
    {
	$mailman->SaveLastError('lastError.txt');	
    }




 

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

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