Python Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Python Examples

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

More Examples...
String
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
SSH Key
SSH
SSH Tunnel
SFTP

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

 

Python to Send Arabic Email

Python script to send Arabic email.

Download Python Programming Example Scripts

# file: SendArabicEmail.py
# -*- coding: utf-8 -*-

# This Python source file uses the utf-8 encoding.

import chilkat 

# How to send Arabic email in Python
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 login, set username/password
# mailman.put_SmtpUsername("myUsername")
# mailman.put_SmtpPassword("myPassword")

# Create a simple email, using Arabic characters in various places.
email = chilkat.CkEmail()
# Indicate that input strings are utf-8
email.put_Utf8(True)
email.put_Subject("أنا قا")
email.put_Body("أنا قادر على أكل الزجاج و هذا لا يؤلمني.")
email.put_From("Support <support@chilkatsoft.com>")

# Add a few recipients
email.AddTo("Matt","matt@chilkatsoft.com")
email.AddTo("Admin","admin@tagtooga.com")

# Chilkat automatically recognizes the Arabic characters and chooses
# a typical charset for Arabic email: iso-8859-6.
# Had the email contained characters not representable in iso-8859-6 (such as Chinese 
# 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 (not success):
	mailman.SaveLastError("lastError.txt");


 

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

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