app/mailers/user_mailer.rb
#Email will be sent to census employees when they reach the DOH.
Email will be sent to census employees when they reach the DOH.
Email will be sent to census employees when they reach the DOH .
def send_future_employee_open_enrollment_invitation(email, census_employee, invitation)
    benefit_applications = census_employee.benefit_sponsorship.benefit_applications.published.select{|ba| ba.effective_period.cover?(census_employee.earliest_effective_date)}
    if email.present? && benefit_applications.any?{|ba| ba.is_submitted?}
      mail({to: email, subject: "Enroll Now: Your Plan Open Enrollment Period has Begun"}) do |format|
        format.html { render "invite_initial_employee_for_open_enrollment", :locals => { :census_employee => census_employee, :invitation => invitation }}
      end
    end
  end
def send_future_employee_open_enrollment_invitation ( email , census_employee , invitation ) benefit_applications = census_employee . benefit_sponsorship . benefit_applications . published . select { | ba | ba . effective_period . cover? ( census_employee . earliest_effective_date ) } if email . present? && benefit_applications . any? { | ba | ba . is_submitted? } mail ( { to : email , subject : "Enroll Now: Your Plan Open Enrollment Period has Begun" } ) do | format | format . html { render "invite_initial_employee_for_open_enrollment" , :locals => { :census_employee => census_employee , :invitation => invitation } } end end end
Email will be sent to census employees when they reach the DOH.
Email will be sent to census employees when they reach the DOH .
email
census_employee
invitation