<?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 load default email client with an attachment? in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-load-default-email-client-with-an/m-p/766951#M346</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Luke - I have done that now, at least it's something. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 May 2016 16:37:32 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2016-05-25T16:37:32Z</dc:date>
    <item>
      <title>How to load default email client with an attachment?</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-load-default-email-client-with-an/m-p/766949#M344</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;Has anyone found a way yet to send an email with an attachment? I realise that it is a wider QML issue rather than an AppStudio issue, and that there are security issues relating to adding attachments using the javascript 'mailto' code, but it does seem a major hole in the Qt/QML platform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the basic code to fire up the default email client, but I can't find any workaround that allows adding an attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our use case involves wanting to take a screenshot and then fire up an email with the image already attached, 'To' and 'Subject' already filled in, etc and allow the user to email that away.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried adding an attachment query parameter (gets ignored by mail client) and embedding the image as an image tag base64 encoded (html coding gets ignored by mail client and is inserted as raw text).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas or workarounds?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function sendEmail() {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var subject = "my subject line";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var body = "some text here";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var urlInfo = AppFramework.urlInfo("mailto:");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urlInfo.queryParameters = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "subject": subject,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "body": body&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Qt.openUrlExternally(urlInfo.url);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 09:45:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-load-default-email-client-with-an/m-p/766949#M344</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-05-25T09:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to load default email client with an attachment?</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-load-default-email-client-with-an/m-p/766950#M345</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;I opened up an enhancement to have native support for email in Qt, but it hasn't gotten a lot of traction. Maybe you can comment on it and add info about attachments?&lt;/P&gt;&lt;P&gt;&lt;A href="https://bugreports.qt.io/browse/QTBUG-44803" title="https://bugreports.qt.io/browse/QTBUG-44803"&gt;https://bugreports.qt.io/browse/QTBUG-44803&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 16:25:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-load-default-email-client-with-an/m-p/766950#M345</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2016-05-25T16:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to load default email client with an attachment?</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-load-default-email-client-with-an/m-p/766951#M346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Luke - I have done that now, at least it's something. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 16:37:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-load-default-email-client-with-an/m-p/766951#M346</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-05-25T16:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to load default email client with an attachment?</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-load-default-email-client-with-an/m-p/766952#M347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way, if anyone stumbles across this old post, AppStudio now has a framework component called EmailComposer that can handle attachments and opens up the device's native email application to send it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nice work AppStudio team!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2019 03:46:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-load-default-email-client-with-an/m-p/766952#M347</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-01-16T03:46:06Z</dc:date>
    </item>
  </channel>
</rss>

