The condensation of phthalic anhydride (I) with aniline (II) in refluxing HOAc produced N-phenyl phthalimide (III). Aromatic sulfonation of (III) with chlorosulfonic acid in the presence of PCl5 afforded the sulfonyl chloride (IV). This was finally condensed with thiomorpholine (V) to furnish the target sulfonamide.