           message.body = message.body.replace(imageBase64, "#{src}")
 
           if useCid
-            message.cids = (message.cids || []).concat([{
-              type: "image/#{imageType}"
-              name: "Image #{imageIdx}"
-              base64: imageBase64.split(',')[1]
-              id: "image#{imageIdx}"
-            }])
+            addImageInCid(message, "image/#{imageType}", "Image #{imageIdx}", imageBase64.split(',')[1], "image#{imageIdx}")
 
     return message
     

      , svg, false
  buildCid: ->
    dynamicFieldsPromise.then (builtDict) ->
      renderBDC prebuildMessage, _svg, true
]
      message.body = message.body.replace '{bdc}', "<img src='#{src}' />"

      if useCid
        addImageInCid(message, 'image/png','BDC', bdcBase64.split(',')[1], 'bdc')
      return message
  
  renderImages = (message, svg, useCid) -> 
    renderEmbeddedImages(message, useCid)
    renderBDC(message, svg, useCid)

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