I need advice with manners

If a relative emails you a birthday gift ecard, and you don’t have their phone number* to call and thank them, is it ok to email them back?

If so, what is the most polite way to phrase such an email?

*I have no way of getting their number, my other relative (that links me to them) won’t supply me the number, saying they prefer emails.