title: how to keep sending emails to users every week depending on user date input in rails
body: <p>new on rails and using windows for now,,
  i have web page that user insert name, date and email. depending on his date input i want to send him email(if <code>@dop.date=date.now-7.days then send email</code> ). how could i implement it?? i want the system get user dates and check it if user insert date, and the date has been for 7 days then send him email...</p>
  
  <hr>
  
  <pre><code>class UserMailer &lt; ActionMailer::Base
    default from: "from@example.com"
  
    def welcome_email(dop)
      @dop = dop
      @url  = "http://example.com/login"
      mail(:to =&gt; dop.mail, :subject =&gt; "Welcome to My Awesome Site")
    end
  end
  </code></pre>
  
  <hr>
  
  <pre><code> def create
      @dop = Dop.new(params[:dop])
  
      respond_to do |format|
        if @dop.save
          UserMailer.welcome_email(@dop).deliver
          format.html { redirect_to @dop, notice: 'Dop was successfully created.' }
          format.json { render json: @dop, status: :created, location: @dop }
        else
          format.html { render action: "new" }
          format.json { render json: @dop.errors, status: :unprocessable_entity }
        end
      end
    end
  </code></pre>
  
  <hr>
  
  <p>here is my model: 
  class Dop &lt; ActiveRecord::Base
    attr_accessible :date,:mail,:name
    validates_presence_of:name
    validates_presence_of:mail
    validates_uniqueness_of:mail</p>
  
  <p>end</p>
  
  <hr>