-
Book Overview & Buying
-
Table Of Contents
Programming ArcGIS 10.1 with Python Cookbook
By :
There will be occasions when you may need to send an e-mail from a Python script. An example might be an alert for the successful completion or error in a long-running geoprocessing operation. On these and other occasions, sending an e-mail can be helpful.
Sending an e-mail through a
Python script will require that you have access to a mail server. This can be a public e-mail service, such as Yahoo, Gmail, or others. It can also use outgoing mail servers configured with applications, such as Microsoft Outlook. In either case, you'll need to know the host name and port of the e-mail server. The Python smtplib module is used to create connections to the mail server and to send e-mails.
The Python email module contains a Message class that represents e-mail messages. Each message contains both headers and a body. This class can't be used to send e-mails; it just handles its object representation. In this recipe, you'll learn how to use the smtp class to send e-mails...
Change the font size
Change margin width
Change background colour