<?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: Format smtp notifications to Group members, arcgis-online in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/format-smtp-notifications-to-group-members-arcgis/m-p/1359450#M9404</link>
    <description>&lt;P&gt;Shame this went unanswered....came here looking for this very thing. Years later and I can't find helpful resources.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Dec 2023 23:04:08 GMT</pubDate>
    <dc:creator>SFM_TravisBott</dc:creator>
    <dc:date>2023-12-11T23:04:08Z</dc:date>
    <item>
      <title>Format smtp notifications to Group members, arcgis-online</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/format-smtp-notifications-to-group-members-arcgis/m-p/766285#M541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again.&amp;nbsp; I want to send a simple e-mail to members from an ArcGIS Online Group.&amp;nbsp; A&amp;nbsp;general&amp;nbsp;version of the script&amp;nbsp;is provided at the bottom. PLEASE help me if you know how to format the&amp;nbsp;email_body for the (it appears) smtp message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My main concern is FORMATTING the email_body because the message protocol clearly does not recognize Python string delimeters - the newlines and tabs are not being produced, just one long sentence basically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have found really helpful resources for more heavy-duty automated messaging (for instance:&amp;nbsp;&lt;A href="https://community.esri.com/docs/DOC-10163" target="_blank"&gt;Send Email When a Feature is Added to an ArcGIS Online Hosted Feature Service&lt;/A&gt;&amp;nbsp;)&amp;nbsp; BUT it does not appear I can access e-mails of Group members, so I am confined to the Arcgis Python API using the Group.notify method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; Group

&lt;SPAN class="comment token"&gt;# get gis object&lt;/SPAN&gt;
my_gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;username &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;my_username&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;my_password&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Group User Info: dict with keys - owner, admins, users&lt;/SPAN&gt;
my_group &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Group&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;my_gis&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;group_id_number&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
members_dict &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; my_group&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get_members&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# give me list of user names from group&lt;/SPAN&gt;
group_users &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; members_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'users'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
subject &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Changes and updates to group'&lt;/SPAN&gt;
signature &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Zach &amp;lt;Lastname\&amp;gt;nGIS Specialist\n(123) 456-7890\tmyemail.com'&lt;/SPAN&gt;
email_body &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'''Hi everybody,\n\nWe have changed some content and protocol
                updated and added metadata to the existing datasets -
                feature layers and shapefiles - and did other stuff.
                \n\nFeel free to contact me if you have questions.
                \n\n'''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;signature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
my_group&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;notify&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;group_users&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; subject&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; email_body&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'email'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:31:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/format-smtp-notifications-to-group-members-arcgis/m-p/766285#M541</guid>
      <dc:creator>ZacharyUhlmann</dc:creator>
      <dc:date>2021-12-12T08:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Format smtp notifications to Group members, arcgis-online</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/format-smtp-notifications-to-group-members-arcgis/m-p/1359450#M9404</link>
      <description>&lt;P&gt;Shame this went unanswered....came here looking for this very thing. Years later and I can't find helpful resources.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 23:04:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/format-smtp-notifications-to-group-members-arcgis/m-p/1359450#M9404</guid>
      <dc:creator>SFM_TravisBott</dc:creator>
      <dc:date>2023-12-11T23:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Format smtp notifications to Group members, arcgis-online</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/format-smtp-notifications-to-group-members-arcgis/m-p/1399052#M9795</link>
      <description>&lt;P&gt;The 'message' argument doesn't recognize python delimiters but it will recognize html formatting.&amp;nbsp; In my usage I've been able to add bold, paragraph, break, style, and link HTML tags to my email body and they come through in the resulting email.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 15:11:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/format-smtp-notifications-to-group-members-arcgis/m-p/1399052#M9795</guid>
      <dc:creator>tmichael_wpjwa</dc:creator>
      <dc:date>2024-03-21T15:11:29Z</dc:date>
    </item>
  </channel>
</rss>

