Dear Mr./Ms. Bossname
This notice is to let you know that, due to medical reasons, I must resign my position at (company) as soon as conveniently possible.
On (date), I received an (injury type) that means I can no longer perform my responsibilities to the performance standards of this company. I am willing to stay until a suitable replacement can be found and trained, and I am happy to help in the transfer of duties.
Thank you for understanding the difficult situation I am in, and thank you for the opportunities that you and this company have offered me.