0

I reed Tower.js doc and totally cant see - how I may get worked mailer?

Mailers section said:

class App.Notification extends Tower.Mailer
  # app/views/mailers/welcome.coffee template
  @welcome: (user) ->
    @mail to: user.email, from: "me@gmail.com"

but example do not marked where this code need to be placed.

Please appoint me.

Meettya
  • 345
  • 2
  • 9
  • Bear in mind Tower is under heavy construction and this feature may not yet be fully implemented. I haven't personally tried to use it, so I don't know, but if you cannot get it to work, you might want to look at the source code and see if the implementation for mailers looks complete. – Edub Kendo Jun 28 '12 at 04:49

1 Answers1

0

I believe the mailer should go in app/mailers, based on the generator for mailers:

class Tower.Generator.MailerGenerator extends Tower.Generator
  sourceRoot: __dirname

  run: ->
    @inside "app", '.', ->
      @inside "mailers", '.', ->
        @template "mailer.coffee", "#{@model.name}Mailer.coffee", ->

module.exports = Tower.Generator.MailerGenerator
Michelle Tilley
  • 157,729
  • 40
  • 374
  • 311