[Python编程(第4版)].(Programming.Python.4th.Edition).Mark.Lutz.文字版

(yzsuai) #1

  • The optional Bcc line, if enabled in the mailconfig module, is prefilled with the
    sender’s address, too, since it’s often used this way to retain a copy (new in this
    version).

  • The body of the reply is initialized with the signature line in mailconfig, along with
    the original message’s text. The original message text is quoted with > characters
    and is prepended with a few header lines extracted from the original message to
    give some context.

  • Not shown in this example and new in this version, too, the Cc header in replies
    is also prefilled with all the original recipients of the message, by extracting ad-
    dresses among the original To and Cc headers, removing duplicates, and removing
    your address from the result. In other words, Reply really is Reply-to-All by
    default—it replies to the sender and copies all other recipients as a group. Since
    the latter isn’t always desirable, it can be disabled in mailconfig so that replies only
    initialize To with the original sender. You can also simply delete the Cc prefill if
    not wanted, but you may have to add addresses to Cc manually if this feature is
    disabled. We’ll see reply Cc prefills at work later.


Figure 14-29. PyMailGUI reply compose window


A PyMailGUI Demo| 1045
Free download pdf