Dear professor xyz,
I am not feeling well since last afternoon. I visited the hospital last night . The doctor has advised me complete bed rest for 2 days.
I have asked my batchmate to take notes for me in class and to get copies of any handouts for me that I am missing during that time.
Sincerely,
"xxx name"