Model: „Vielen Dank für [Geschenk/Hilfe]. Ich habe mich sehr gefreut. Das war sehr nett von dir/Ihnen.“ Choose „dir“ informally and „Ihnen“ formally.