Python Examples

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

Python Examples

Quick Start
Unicode
Byte Array
Bz2
Certificates
CSV
Email
Encryption
FTP
HTML Conversion
HTTP
IMAP
MHT
MIME
POP3
RSA
S/MIME
Signatures
Socket / SSL
SFTP
SMTP
Spider
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

 

 

 

 

 

 

 

High-Priority Email

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

Shows how to send high-priority email in Python.

# file: EmailPriority.py

import 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 = 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 = 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 Python programming language")
email.put_Body("High priority email sent from a Python script")
email.put_From("Chilkat Support <support@chilkatsoft.com>")

# Add a few recipients...
email.AddTo("Matt","matt@chilkatsoft.com")
email.AddTo("John","john@example.com")

# Send the email
success = mailman.SendEmail(email)
if (not success):
	mailman.SaveLastError("lastError.txt");





 

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