[Users] Limitations of Python scripts

Egbert Bouwman egbert.bouwman at gmail.com
Wed Apr 17 19:49:08 CEST 2013


 alb348 at gmail.com wrote:
> More in general, I would like to know from someone who uses the Python
> scripts in CM intensively how they work overall, and what are their main
> limitations.
The qualifications you ask for don't apply to me, because I am an
amateur programmer, and i have written only one python script for
claws-mail.
I can only tell this:
if you configure claws to execute the following action:
script.py %f
then your message is available in script.py, and you can do with it
anything you can do in python.
I import and use the folowing modules:

from __future__ import print_function
import os, sys, re, codecs
import email, imaplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import Tkinter as tk, tkSimpleDialog as sd

And they all behave as i expected them to do.

However there is a strict internet rule that you don't change a
received message, and somewhere in the claws-mail docs is stated that
claws conforms to that rule.
So if you want to transform a message into something else,
you have to create a new message based on the old one,
and that new one you can send to anybody, even to yourself.

I had to do quite some studying, mostly in
Python Network Programming (Apress), by John Goerzen.
egbert

-- 
Egbert Bouwman  [GMail]



More information about the Users mailing list