I think the coupling visible in the photo would have originally been a Calder coupling, a rubber coupling. They were really short. I think that type is no longer available. If you need this part, a similar alternative would be a 3"x3" Fernco coupling. It is longer than the original, but will work. From the coupling you will need to extend that pipe about 2'" to 3" beyond the metal then add the part HiJoSilver suggested.
Originally there would have been an escutcheon (trim ring) that fit tight onto the pipe and covered the perimeter of the hole in the metal. I think these trims are no longer available. As an alternate, a piece of heavy rubber sheet (like a truck bed mat or mud flap) could be cut as needed. Or, maybe a 3"x4" Fernco coupling could be trimmed short to create a cone shaped trim. Either of these would need to be slid over the pipe before installing the sewer termination.
You can see that escutcheon here at post #5 (but the valve is an add on, not original):