Forum: Ruby on Rails both user and secret are required, an error from sending ema

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B4bc9eb8cafd27b83f686d8263d4fa41?d=identicon&s=25 Maricris Nonato (kristeta126)
on 2007-01-06 09:36

Can anybody please tell me what this error means?

"both user and secret are required"

I was trying to send an email.  I had my environment.rb configured to
have the following (because I was running in development):

ActionMailer::Base.server_settings = {
  :address  => "",
  :port  => 25,
  :username => 'myusername',
  :password => 'mypassword',
  :authentication => 'plain'


and my model goes like this:

class Notifier < ActionMailer::Base
  def update_email( user )
    @recipients = "me@myemailcom"
    @from = ""
    @subject = "New Email Address Information"

    # Email body variable substitutions go here
    @body["firstname"] = user.firstname
    @body["lastname"] = user.lastname
    @body["activation"] = user.activation
    @body["password"] = user.password
    @body["username"] = user.username

and I invoke it from my method as such:

    def updateEmailDetail
          @cuser = User.find(params[:current_user][:id])
           if @cuser.update_attributes(params[:current_user])
             flash['notice'] = 'Successful update'
             flash['error'] = 'An error occurred.'
      redirect_to :controller => 'home', :action => 'acct', :cat =>

When I do execute the method, I get the error "both user and secret are
required".  Does any body know what this means?  I hope someone might
see this post and shed some light.   Is there something wrong about the
way I called it?

Many thanks!
This topic is locked and can not be replied to.