By esterification of bis-(3-hydroxypropyl)amine (I) with methanesulfonic anhydride (II) in acetonitrile.