Does "apology" mean the same thing in these two sentences?

He wrote a letter of apology to the hostess.

What he said really hurt my feelings, but his apology sounded so sincere that I couldn't help but forgive him.
the same meaning