The same way they are now: https://www.tenancy.govt.nz/ending-a-tenancy/subletting/
Optional email code