Can a side mirror that has been knocked loose but not detatched be repaired? on 2002 Mitsubishi Galant

I was side swiped by a truck and the side mirror body was knocked loose but not completely off. I want to know if the existing mirror body can be reattached or is a replacement needed.

Asked by for the 2002 Mitsubishi Galant