   mailer = nodemailer.createTransport options.account
 
   i18n_data = {}
+  template_cache = {}
   priority_cache = {}
 
   for language_info in options.language_infos

      m = ->
        return moment.apply(@, arguments).locale(i18n_options.language).tz(i18n_options.timezone)

      renderTemplate template_name, _.extend({t: t, m: m}, view_data), (err, mail_body) ->
        return callback err if err

        {file_name} = getTemplateInfo template_name

        mailer.sendMail
          from: options.send_from

      file_path: file_path
    }

  getTemplate = (template_file, callback) ->
    if template_cache[template_file]
      return callback null, template_cache[template_file]

    fs.readFile template_file, callback

  renderTemplate = (engine, template_source, view_data) ->
    if engine == 'jade'
      return jade.render template_source, view_data

    else if engine == 'html'
      return _.template(template_source) view_data

    else
      throw new Error 'Unknown Engine'

  return {
    sendMail: (template_name, to_address, view_data, i18n_options, callback) ->
