 )->
   converter = new showdown.Converter()
 
-  renderImages = (message, useCid) -> 
+  addImageInCid = (message, type, name, base64, id) ->
+    message.cids = (message.cids || []).concat([{type: type, name: name, base64: base64, id: id}])
+
+  renderEmbeddedImages = (message, useCid) -> 
     images = message.body.match(/data:image\/(.*);base64,([^"]*)/gm)
 
     if images.length > 0

      message.body = message.body.replace '{bdc}', "<img src='#{src}' />"

      if useCid
        message.cids = [{
          type: 'image/png'
          name: 'BDC'
          base64: bdcBase64.split(',')[1]
          id: 'bdc'
        }]
      renderImages(message, useCid)
      return message

  renderTo = (project) ->
    emails = (member.email for member in project.team when member.daily is 'to')

      , svg, false
  buildCid: ->
    dynamicFieldsPromise.then (builtDict) ->
      renderImages(prebuildMessage, _svg, true)
