<?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 How to send a zip file by mail ? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-send-a-zip-file-by-mail/m-p/327208#M14209</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I've created a zip file in an automation chain and I'd like to send this file by mail.
Here's a part of my chain :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;File &amp;gt; Get Document File &amp;gt; xpath: file:content
File &amp;gt; Zip &amp;gt; filename: photos.zip
Execution Context &amp;gt; Set Context Variable From Input &amp;gt; name: theZIPFile
Notification &amp;gt; Send E-mail &amp;gt; files: @{Context["theZIPFile"]}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get this error :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;org.nuxeo.ecm.automation.AdapterNotFoundException: No type adapter found for input: class org.nuxeo.ecm.core.api.impl.blob.FileBlob and output class org.nuxeo.ecm.automation.core.util.StringList
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any idea on how to pass the zip file as an attached file to the mail ?&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;Fabrice&lt;/P&gt;</description>
    <pubDate>Thu, 24 May 2012 10:13:27 GMT</pubDate>
    <dc:creator>fabrice_</dc:creator>
    <dc:date>2012-05-24T10:13:27Z</dc:date>
    <item>
      <title>How to send a zip file by mail ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-send-a-zip-file-by-mail/m-p/327208#M14209</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I've created a zip file in an automation chain and I'd like to send this file by mail.
Here's a part of my chain :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;File &amp;gt; Get Document File &amp;gt; xpath: file:content
File &amp;gt; Zip &amp;gt; filename: photos.zip
Execution Context &amp;gt; Set Context Variable From Input &amp;gt; name: theZIPFile
Notification &amp;gt; Send E-mail &amp;gt; files: @{Context["theZIPFile"]}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get this error :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;org.nuxeo.ecm.automation.AdapterNotFoundException: No type adapter found for input: class org.nuxeo.ecm.core.api.impl.blob.FileBlob and output class org.nuxeo.ecm.automation.core.util.StringList
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any idea on how to pass the zip file as an attached file to the mail ?&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;Fabrice&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2012 10:13:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-send-a-zip-file-by-mail/m-p/327208#M14209</guid>
      <dc:creator>fabrice_</dc:creator>
      <dc:date>2012-05-24T10:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a zip file by mail ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-send-a-zip-file-by-mail/m-p/327209#M14210</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;The problem is probably coming from the fact that your operation inputs does not match your outputs.
Send Email is waiting for a Document or a Document List.
In your operations, your Zip gives you a blob (a file), that is kept by set context variable.
So you need a way to give a Document to Send Email.&lt;/P&gt;
&lt;P&gt;The solution is to use :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Push &amp;amp; Pop &amp;gt; Push Document
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(or Push Document list) before the Get File Operation. It will push the document in a pile in the context.
And then, just before the Send Email, use :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; Push &amp;amp; Pop &amp;gt; Pop Document
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Push and Pop Operations are operations that enables you to creates piles to temporary save document into the context.&lt;/P&gt;
&lt;P&gt;However, I'm surprised that Studio does not tell you about this input/output problem...&lt;/P&gt;
&lt;P&gt;Is it better now?&lt;/P&gt;
&lt;P&gt;Fred&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2012 08:33:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-send-a-zip-file-by-mail/m-p/327209#M14210</guid>
      <dc:creator>Fred_Vadon</dc:creator>
      <dc:date>2012-05-25T08:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a zip file by mail ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-send-a-zip-file-by-mail/m-p/327210#M14211</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;sorry, I didn't put my exact chain because my problem was to attach the zip file.
Here's my complete chain :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Fetch &amp;gt; Context Document(s)
Execution Context &amp;gt; Set Context Variable From Input &amp;gt; name: theDocument
Service &amp;gt; Get Linked Documents
File &amp;gt; Get Document File &amp;gt; xpath: file:content
File &amp;gt; Zip &amp;gt; filename: photos.zip
Execution Context &amp;gt; Set Context Variable From Input &amp;gt; name: theZIPFile
Execution Context &amp;gt; Restore Document Input &amp;gt; name: theDocument
Notification &amp;gt; Send E-mail &amp;gt; files: @{Context["theZIPFile"]}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And so is my problem : "files" seams to look for a stringlist and my context variable "theZIPFile" is a blob. How could I attach the zip file to the mail ?&lt;/P&gt;
&lt;P&gt;Thank you very much for your help&lt;/P&gt;
&lt;P&gt;Fabrice&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2012 16:58:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-send-a-zip-file-by-mail/m-p/327210#M14211</guid>
      <dc:creator>fabrice_</dc:creator>
      <dc:date>2012-05-25T16:58:55Z</dc:date>
    </item>
  </channel>
</rss>

