<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to install email python module in ArcGIS Pro environment to use with Python 3.x? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-install-email-python-module-in-arcgis-pro/m-p/575775#M45109</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jake&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was focusing on the wrong thing - I was thinking there was something wrong with my python environment, when, as you point out, I hadn't read the documentation closely enough to realise there were those differences in the import statements required between python v2 and v3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mattias below helped with the exact import statements to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Oct 2017 07:42:19 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2017-10-07T07:42:19Z</dc:date>
    <item>
      <title>How to install email python module in ArcGIS Pro environment to use with Python 3.x?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-email-python-module-in-arcgis-pro/m-p/575771#M45105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a script that I used for sending emails from ArcMap using python 2.x. It uses all the import statements below. When I try to use the same script in ArcGIS Pro as a script (using python 3.x), it says:&amp;nbsp;ImportError: No module named 'email.MIMEMultipart'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the 'package manager' in ArcGIS Pro itself, I can't see any module called 'email' that I can import. Can anyone tell me how I can add that module to the ArcGIS Pro python environment, or whether I need to find some way to re-write my script without that module. Or can anyone suggest an alternate module that can do the same tasks?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;import smtplib, os&lt;BR /&gt;from email.MIMEMultipart import MIMEMultipart&lt;BR /&gt;from email.MIMEBase import MIMEBase&lt;BR /&gt;from email.MIMEText import MIMEText&lt;BR /&gt;from email.MIMEImage import MIMEImage&lt;BR /&gt;from email.Utils import COMMASPACE, formatdate&lt;BR /&gt;from email import Encoders&lt;BR /&gt;import ConfigParser&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;msg = MIMEMultipart('mixed')&lt;/P&gt;&lt;P&gt;msg['From'] = send_from&lt;BR /&gt; msg['To'] = send_to if isinstance(send_to, basestring) else COMMASPACE.join(send_to)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2017 10:24:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-email-python-module-in-arcgis-pro/m-p/575771#M45105</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-10-06T10:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to install email python module in ArcGIS Pro environment to use with Python 3.x?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-email-python-module-in-arcgis-pro/m-p/575772#M45106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would take a look at some of the example from the Python 3.x help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://docs.python.org/3/library/email.examples.html" title="https://docs.python.org/3/library/email.examples.html"&gt;19.1.8. email: Examples — Python 3.6.3 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can compare these examples to that of Python 2.x:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://docs.python.org/2/library/email-examples.html" title="https://docs.python.org/2/library/email-examples.html"&gt;18.1.11. email: Examples — Python 2.7.14 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2017 12:59:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-email-python-module-in-arcgis-pro/m-p/575772#M45106</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2017-10-06T12:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to install email python module in ArcGIS Pro environment to use with Python 3.x?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-email-python-module-in-arcgis-pro/m-p/575773#M45107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this instead:&lt;/P&gt;&lt;P&gt;from email.mime.multipart import MIMEMultipart&lt;BR /&gt;from email.mime.base import MIMEBase&lt;BR /&gt;from email.mime.text import MIMEText&lt;BR /&gt;from email.mime.image import MIMEImage&lt;BR /&gt;from email.utils import formatdate&lt;BR /&gt;COMMASPACE = ', '&lt;BR /&gt;from email import encoders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2017 22:18:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-email-python-module-in-arcgis-pro/m-p/575773#M45107</guid>
      <dc:creator>MattiasWallin</dc:creator>
      <dc:date>2017-10-06T22:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to install email python module in ArcGIS Pro environment to use with Python 3.x?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-email-python-module-in-arcgis-pro/m-p/575774#M45108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mattias&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes those worked. Thanks for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Oct 2017 07:39:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-email-python-module-in-arcgis-pro/m-p/575774#M45108</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-10-07T07:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to install email python module in ArcGIS Pro environment to use with Python 3.x?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-install-email-python-module-in-arcgis-pro/m-p/575775#M45109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jake&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was focusing on the wrong thing - I was thinking there was something wrong with my python environment, when, as you point out, I hadn't read the documentation closely enough to realise there were those differences in the import statements required between python v2 and v3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mattias below helped with the exact import statements to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Oct 2017 07:42:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-install-email-python-module-in-arcgis-pro/m-p/575775#M45109</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-10-07T07:42:19Z</dc:date>
    </item>
  </channel>
</rss>

