Python "it" Scripting
|
Introduction
This page presents a python script for an 'it' command that will send an email message
with the current catalog image as an attachment. The interface is split into two tabbed
panels - figures 1 and 2. In the "Sign In" panel the user must enter the name of their email
account's Simple Mail Transfer Protocol (SMTP) server, it's port number, their email
address and password. This
link
lists the names of many SMTP servers.
cd $RMSTREE tar xvf ~/Downloads/mime.tar |
|
|
The "Email" field is where the user must enter their email address. The values of most of the text fields can be permanently set via the following defaults. For example, class EmailImage(It3Command): DEFAULT_SENDER = 'YOUR_EMAIL_ADDRESS' DEFAULT_RECIPIENT = 'THEIR_EMAIL_ADDRESS' DEFAULT_SMTP = 'smtp.gmail.com' DEFAULT_PORT = '587'
Naturally, there is not a default "Password" variable so it must be entered via the UI
when the "Email Image..." menu is used.
|
© 2002- Malcolm Kesson. All rights reserved.