<?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: Attach a document into an email in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295083#M248213</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eduard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Javascript in Workflows execute in a different context to Javascript in Alfresco and it seems Alfresco “actions” are not defined in that context. Alfresco workflow is Activiti which has some common objects, but not that many it would seem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have very little experience of workflow but this does not surprise me and I doubt that you could easily make Alfresco “actions” available in workflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use my action you could use the following workaround:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·         Create a rule on the folder that contains the documents that will be in your workflows. It can be a set of folders &amp;amp; sub folders of course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·         Create a custom aspect called anything you like but let’s call it “sendmail” with properties mailsent (Boolean) and mailsentat (date).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·         Get your workflow to add this aspect to your document when you want to send your email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·         Get you rule to check if this aspect exists on your document whenever your document is updated and if the aspect doesn’t exists add it, send the mail and update the properties. If the aspect does exist, check the values and see if mailsent is true. If it isn’t, send the mail and update the properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now; I suspect that you could make my special mail object available in Activiti via configuration, but that is well beyond my paygrade.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jan 2017 09:37:34 GMT</pubDate>
    <dc:creator>rjohnson</dc:creator>
    <dc:date>2017-01-31T09:37:34Z</dc:date>
    <item>
      <title>Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295026#M248156</link>
      <description>Hello all, i would like to attach a document when it is uploaded to alfresco. I know that there is the default notification from the workflow but for internal reason my customers ask me to attach the original document into an email. I have writen a small script but i don't manage to attach the docum</description>
      <pubDate>Mon, 07 Oct 2013 14:41:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295026#M248156</guid>
      <dc:creator>mvicidomini</dc:creator>
      <dc:date>2013-10-07T14:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295027#M248157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't think its supported.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 14:52:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295027#M248157</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2013-10-07T14:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295028#M248158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to send mail in task-listner java class which will be invoked during transition.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 09:15:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295028#M248158</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2013-10-08T09:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295029#M248159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The standard mail action does not allow attachments. You need to create a derivative. There is one on the internet which I downloaded and it works fine with 4.2c. My code is based on the code at &lt;/SPAN&gt;&lt;A href="http://savicprvoslav.blogspot.co.uk/2010/10/send-html-email-from-alfresco-33-with.html" rel="nofollow noopener noreferrer"&gt;http://savicprvoslav.blogspot.co.uk/2010/10/send-html-email-from-alfresco-33-with.html&lt;/A&gt;&lt;SPAN&gt;. Happy to share it with your but I can't attach it to this post so send me a message with an email address &amp;amp; I will forward it on.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 10:17:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295029#M248159</guid>
      <dc:creator>rjohnson</dc:creator>
      <dc:date>2013-10-08T10:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295030#M248160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;SPAN&gt;Hello Bob thanks a lot for your help. &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:latong06@gmail.com" rel="nofollow noopener noreferrer"&gt;latong06@gmail.com&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 14:10:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295030#M248160</guid>
      <dc:creator>mvicidomini</dc:creator>
      <dc:date>2013-10-09T14:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295031#M248161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sent. Any issues, post here and I will do what I can&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 16:58:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295031#M248161</guid>
      <dc:creator>rjohnson</dc:creator>
      <dc:date>2013-10-09T16:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295032#M248162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Bob , i'm sorry but i was to fast. I add a rule that will execute that will send an email with the document that has just been added.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that it execute a mail loop without end.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please find my script below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you see something wrong ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var PubDate = document.properties["cm:created"];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.properties["cm&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ublicationDate"] = PubDate;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.save();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var renditionDef = renditionService.createRenditionDefinition('cm:'+document.name, 'reformat');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;renditionDef.parameters['mime-type'] = "application/pdf";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var pdfFile = renditionService.render(document, renditionDef);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var mail = actions.create("fg-mail");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;var addresse = "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:admin@cip.mc" rel="nofollow noopener noreferrer"&gt;admin@cip.mc&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var templateArgs = new Array();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var templateModel = new Array();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;templateArgs['addressee'] = addresse;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;templateModel['args'] = templateArgs;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mail.parameters.template_model = templateModel;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Notify Email Templates/notify_user_email_fr.html.ftl");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mail.parameters.subject = "Ajout de document";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mail.parameters.from = ANEMAIL;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mail.parameters.text = "Template has not been found. Please call Liberator support";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mail.parameters.node_to_attach = pdfFile;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mail.parameters.attachment_extension = "pdf";&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mail.parameters.to = MYEMAIL; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mail.execute(document);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 15:27:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295032#M248162</guid>
      <dc:creator>mvicidomini</dc:creator>
      <dc:date>2013-10-17T15:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295033#M248163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, I can't see a loop in your code for sure so I suspect that your rule is firing when the document is added and when the PDF is created as a rendition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First I assume you have a rule that only fires when content is added to the folder. Nothing that fires on an update.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Assuming that is the case I suspect that Alfresco considers the creation of the rendition a "new" document (if you look inside the node browser it is a hidden child node of your document). If memory serves your PDF Rendition has a document type of cm&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;dfExport.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at my code, I filter on document type and so this may be why I have never had this problem, so I would suggest you add code in your rule javascript like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;if(document.typeShort != "cm:pdfExport") {&lt;BR /&gt;&amp;nbsp; …… execute your code&lt;BR /&gt;}&lt;BR /&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and see if that works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 17:17:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295033#M248163</guid>
      <dc:creator>rjohnson</dc:creator>
      <dc:date>2013-10-17T17:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295034#M248164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does not work , it is still looping &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Oct 2013 10:30:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295034#M248164</guid>
      <dc:creator>mvicidomini</dc:creator>
      <dc:date>2013-10-18T10:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295035#M248165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does it repeatedly email the same thing?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Oct 2013 11:26:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295035#M248165</guid>
      <dc:creator>rjohnson</dc:creator>
      <dc:date>2013-10-18T11:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295036#M248166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes unfortunatly&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Oct 2013 12:24:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295036#M248166</guid>
      <dc:creator>mvicidomini</dc:creator>
      <dc:date>2013-10-18T12:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295037#M248167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you try using the standard mail object and just mail yourself a message. If that loops its a problem with the rule trigger. If not then its something to do with the fg-mail object but I cannot think what as near enough I do exactly what you are trying to do and it works fine for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Oct 2013 13:22:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295037#M248167</guid>
      <dc:creator>rjohnson</dc:creator>
      <dc:date>2013-10-18T13:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295038#M248168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i have already try with the simple email notification and it work fine. Maybe it is a problem with my script …. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have any advise ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Oct 2013 13:45:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295038#M248168</guid>
      <dc:creator>mvicidomini</dc:creator>
      <dc:date>2013-10-18T13:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295039#M248169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Honestly your script looks fine, and I do more or less the same thing as you and it works well for me. The difference is that I look for specific document types and only email PDF's of those whereas I assume you will email a PDF for any document type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can only assume that the creation of the rendition is causing the script to trigger over and over and the document type of the rendition is not cm&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;dfExport - it may well be cm:content in which case a PDF rendition and your original document will be indistingushable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing to try would be this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;replace&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var renditionDef = renditionService.createRenditionDefinition('cm:'+document.name, 'reformat');&lt;BR /&gt;renditionDef.parameters['mime-type'] = "application/pdf";&lt;BR /&gt;var pdfFile = renditionService.render(document, renditionDef);&lt;BR /&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;with&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var pdfFile = document.transformDocument("application/pdf", userhome);&lt;BR /&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will create the PDF document in userhome which (I presume) is not covered by your rule (if it is create the PDF somewhere that isn't).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If that doesn't work I am at a loss, but please let me know as I will test it on my own installation and figure it out because this is important to me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Oct 2013 14:46:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295039#M248169</guid>
      <dc:creator>rjohnson</dc:creator>
      <dc:date>2013-10-18T14:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295040#M248170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Still looping, but the thing i that if i do not apply the rule the the subfolder it works fine. As soon as i apply it on the subfolders it is at this moment that the mail sending is looping.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks again for all your time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Oct 2013 21:36:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295040#M248170</guid>
      <dc:creator>mvicidomini</dc:creator>
      <dc:date>2013-10-20T21:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295041#M248171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, it sounds like somethings hapening in your sub folders. Do you have any other rules?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Oct 2013 23:22:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295041#M248171</guid>
      <dc:creator>rjohnson</dc:creator>
      <dc:date>2013-10-20T23:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295042#M248172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nothing, it is a fresh install … &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 06:30:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295042#M248172</guid>
      <dc:creator>mvicidomini</dc:creator>
      <dc:date>2013-10-21T06:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295043#M248173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found the mistake, it is link to &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var PubDate = document.properties["cm:created"];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.properties["cm&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ublicationDate"] = PubDate;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.save();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Because as soon as i removed it the mail stop looping but i cannot retrieve the file to attach to the email anymore. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So , how can i retrieve the referenc of the document that has just been added&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 08:12:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295043#M248173</guid>
      <dc:creator>mvicidomini</dc:creator>
      <dc:date>2013-10-21T08:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295044#M248174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So if I understand, when you remove the code above the rule doesn't recognise "document" as existing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is so then I think you have a deeper problem here because "document" always exists in a rule and points to the "document" you have just created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you sure that your issue is not with the template trying to use document.properties["cm&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ublicationDate"] and failing because that does not exist (or is null)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What error do you actually get?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 14:29:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295044#M248174</guid>
      <dc:creator>rjohnson</dc:creator>
      <dc:date>2013-10-21T14:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a document into an email</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295045#M248175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when i use var pdfFile = document.transformDocument("application/pdf", userhome); it creates correctly the file in the userhome.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But mail.parameters.node_to_attach = pdfFile does not retrieve anything i mean there is no attachment to the email.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 08:20:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/attach-a-document-into-an-email/m-p/295045#M248175</guid>
      <dc:creator>mvicidomini</dc:creator>
      <dc:date>2013-10-22T08:20:42Z</dc:date>
    </item>
  </channel>
</rss>

