Only question I had was do you need global temp table rather than plain?
I have found that xp_sendmail does not like accessing standard temp tables that were created outside of it. I presume that this is caused by xp_sendmail running as a seperate connection, and therefore being unable to access the temp table that the job has created. I find that a similar problem occurs with variables.
Have you any suggestions as to how this difficulty might be overcome? (or, failing that, a better understanding of what might be causing this?)