title: ActionMailer::Base Dynamic :from email address
body: <p>How can I change this code in my email mailer so that when current_user sends out an email from the application it is received by the recipient :from => current_user.email. </p>
  
  <p>Currently it is from "notification@example.com" but I would like this to change dynamically and Is this possible without resulting in emails going into junk?</p>
  
  <pre><code>class EmailMailer &lt; ActionMailer::Base
      default :from =&gt; "notification@example.com"
  
      def email_listing(user, listing, email)
          @user = user 
          @listing = listing
          @email = email
          @url  = "www.example.com"
  
          mail(:to =&gt; @email.email, :subject =&gt; @user.name)
      end
  end 
  </code></pre>