Said notice shall be in writing.
Upon such transfer, the lessor or his agent shall continue to be liable with respect to the provisions of this section until:
(a) there has been a transfer of the amount of the security deposit so held to the lessor's successor in interest and the tenant has been notified in writing of the transfer and of the successor in interest's name, business address, and business telephone number;
(b) there has been compliance with this clause by the successor in interest; or
(c) the security deposit has been returned to the tenant.
In the event that the lessor fails to transfer said security deposit to his successor in interest as required by this subsection the successor in interest shall, without regard to the nature of the transfer, assume liability for payment of the security deposit to the tenant in accordance with the provisions of this section; provided, however, that if the tenant still occupies the dwelling unit for which the security deposit was given, said successor in interest may satisfy such obligation by granting the tenant free use and occupancy of the dwelling unit for a period of time equivalent to that period of time for which the dwelling unit could be leased or occupied if the security deposit were deemed to be rent. The liability imposed by this paragraph shall not apply to a city or town which acquires title to property pursuant to chapter sixty or to a foreclosing mortgagee or a mortgagee in possession which is a financial institution chartered by the commonwealth or the United States. The term "rent'', as used in the preceding sentence, shall mean the periodic sum paid by the tenant for the use and occupation of the dwelling unit in accordance with the terms of his lease or other rental agreement.
(6) The lessor shall