Sex releasing endorphins

Is it true that when you have sex with somebody you become attached to them