Hello Mr. Smith:
Thank you very much for inviting me to_________(写上本来要去干什么,可以填"the party" “the show"之类的). I sincerely apologize for not being able to show up due to ____________________________________(这句写原因,因为你的问题中没有写明原因是什么...我也不知道怎么写...如果你也不知道的话,可以用"unexpected circumstances")I truly hope that you can forgive my absence.
Apologies,
这里写你的名字。