IgM tests can be used to diagnose recent herpes infections, such as genital herpes or oral herpes. Elevated IgM levels, along with clinical symptoms and other diagnostic tests, can support a herpes diagnosis. However, IgM tests are not used for recurrent herpes episodes.