title: Sending mail function in rails 2.3
body: <p>Current version I am using is:
  Ruby = 1.8.7,  rails = 2.3.2</p>
  
  <p>I wrote sending mails function. While I am running I got the below error"</p>
  
  <blockquote>
    <p>undefined method `default' for UserMailer:Class</p>
  </blockquote>
  
  <p>my <code>UserMailer</code> class:-</p>
  
  <pre><code>default :from =&gt; "example@gmail.com"
  
    def welcome_email(user)
      @user = params[:user]
      @url  = 'http://example.com/login'
      mail(:to =&gt; "test123@gmail.com", :subject =&gt; "Test")
    end
  end
  </code></pre>
  
  <p>How to solve this issue?<br>
  Thank you.</p>