title: Python - Py2exe can't build .exe using the 'email' module
body: <p>py2exe does not work with the standard email module</p>
  
  <p>Hello. I am trying to use py2exe for converting a script into an exe. The build process shows this:</p>
  
  <hr>
  
  <p>The following modules appear to be missing</p>
  
  <h2>['email.Encoders', 'email.Generator', 'email.Iterators', 'email.MIMEBase', 'email.MIMEMultipart', 'email.MIMEText', 'email.Utils', 'email.base64MIME']</h2>
  
  <p>The executable does not work. The referenced modules are not included. I researched this on the Internet and I found out that py2exe has a problem with the Lazy import used in the standard lib email module. Unfortunately I have not succeeded in finding a workaround for this problem. Can anyone help?</p>
  
  <p>Thank you,</p>
  
  <p>P.S.
  Imports in the script look like this:</p>
  
  <p>Code: Select all
      import string,time,sys,os,smtplib
      from email.MIMEMultipart import MIMEMultipart
      from email.MIMEBase import MIMEBase
      from email.MIMEText import MIMEText
      from email import Encoders</p>