> Perdón... no leí la parte de que necesitabas hacerlo desde el environment.rb 
> :P
Pero no, está bien, revisando código tengo un .rb llamado
gallery_mailer.rb dentro de models:

class MyMailer < ActionMailer::Base

  def newpicture(author)
    @subject    = 'New Picture in the Users Gallery'
    @body       = {}
    @recipients = author.email
    @from       = ENV['MAILFROM']
    @sent_on    = Time.now
    @headers    = {}
  end

  def newpost(author)
    @subject    = 'New Post in the Users Gallery'
    @body       = {}
    @recipients = author.email
    @from       = ENV['MAILFROM']
    @sent_on    = Time.now
    @headers    = {}
  end

  def newpostpicture(picture)
    @subject    = 'New Post about a picture of yours in the Users Gallery'
    @body["picture"] = picture
    @recipients = picture.author.email
    @from       = ENV['MAILFROM']
    @sent_on    = Time.now
    @headers    = {}
  end

  def forgotpassword(author, reset_url)
    @subject    = 'Graphics - Reset Password'
    @body[:url] = reset_url
    @recipients = author.email
    @from       = ENV['MAILFROM']
    @sent_on    = Time.now
    @headers    = {}
  end
        
  def register(email, register_data, progname, url)
    @subject    = 'Graphics - Trial Registration'
    @body[:data] = register_data
    @body[:progname] = progname
    @body[:download_url] = url
    @recipients = email
    @from       = ENV['MAILFROM']
    @sent_on    = Time.now
    @headers    = {}
  end
end

Si mal no me equivoco es agregar @bcc = '[EMAIL PROTECTED]' a cada método.
_______________________________________________
Ruby mailing list
[email protected]
http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar

Responder a