title: Render Different View (template) for ActionMailer
body: <p>I'm trying to do a conditional render of a different template from ActionMailer (Rails 3.1.1). I want most users to get the normal <code>welcome.html.erb</code> template, but some users to get the special <code>welcome_photographer.html.erb</code> template. This type of thing works in ActionController:</p>
  
  <pre><code># (in /app/mailers/user_mailer.rb) 
  def welcome(user)
    @user = user
    mail(:to =&gt; "#{@user.name} &lt;#{@user.email}&gt;", :subject =&gt; "Welcome to ...")
    render "welcome_photographer" if @user.is_photographer
  end
  </code></pre>
  
  <p>But the render doesn't work -- everyone gets the standard <code>welcome.html.erb</code> even if <code>@user.is_photographer == true</code></p>