When someone invites you to something, be it a dinner, a shower, a wedding, a funeral and you are unable to attend, do two things:
1. Call them and say "Sorry but I cannot…" Don’t email, don’t IM, don’t assume they won’t care, DO call. The lost art of talking. If they cared enough to invite you, care enough to personally respond.
2. If that certain something would require a gift, send one anyway.
I have definitely been an offender of this recent bit of wisdom and have not done either in many cases. After learning the hard way how it feels, and the good way being the recipient of both 1 and 2 in the event regrets are needed, I shall now vow to be better and live by this rule. It matters and can make a very big difference to people.