Second printing changes

The changes below were made in the book's second printing,
which happened in April 2001, one month after the initial
release.  For other changes made in the third printing 
(early June 2001), click here.

The following 3 fixes make mail send example code more 
robust, by adding a blank line between mail headers and
message text.  All email examples do work as shown in the
book, but some servers may otherwise have problems if the
first text line happens to contain a colon (they might 
incorrectly classify it as a header line).  


1) Page 612, example 11-17, 7th line from top of page:
need to add the two characters "\n" to the end of the line,
after the pair already there, and before the closing single 
quote.  That is, change:

    text =('From:%s \nTo:%s \nDate:%s \nSubject:%s \n'

to:

    text =('From:%s \nTo:%s \nDate:%s \nSubject:%s \n\n'


2) Page 663, example 11-23, 19th line from page bottom:
Same kind of fix; change:

    hdrs =hdrs +'X-Mailer:PyMailGui Version 1.0 (Python)\n'

to:

    hdrs =hdrs +'X-Mailer:PyMailGui Version 1.0 (Python)\n\n'

 
3) Page 773, example 13-4, very last line on page:
Same kind of fix; change:

    hdrs =hdrs +'X-Mailer:PyMailCgi Version 1.0 (Python)\n'

to:

    hdrs =hdrs +'X-Mailer:PyMailCgi Version 1.0 (Python)\n\n'



The effected examples' locations on the CD:

1) Page 612 example 11-17 is on CD as:
    Examples\PP2E\Internet\Email\smtpmail.py
    Line 19

2) Page 663, example 11-23 is on CD as:
    Examples\PP2E\Internet\Email\PyMailGui.py 
    Line 228

3) Page 612 example 11-17 is on CD as:
    Examples\PP2E\Internet\Cgi-Web\PyMailCgi\onSendSubmit.cgi
    Line 24



[Home page] Books Code Blog Python Author Train Find ©M.Lutz