class InvitationMailer < ApplicationMailer
  def invite(user)
    @user = user
    @invitation_url = invitation_url(@user.invitation_token)
    @expires_at = @user.invitation_sent_at + User::INVITATION_TOKEN_EXPIRY

    mail(
      to: @user.email,
      subject: "You've been invited to join Sanasto Wiki"
    )
  end
end
