Such as a person standing at the door of his house when someone passes by, and he says to him, “Please, come in.” This is an invitation that is most likely not sincere, but merely prompted by politeness—unless we know that the person is his friend and that he genuinely wishes to sit with him. If it is merely out of politeness or embarrassment, accepting it is not obligatory. Indeed, there would be grounds for saying that it is prohibited, for it may sometimes put you in an awkward position. At times, you may say to him at the door, “Please, come in,” and he enters, while you may wish, for example, to sleep or to sit with your family. Perhaps it is your custom to have lunch with your family, and this is the only time you gather with them.
Once these conditions are fulfilled, accepting the invitation becomes obligatory, because the Prophet, peace and blessings be upon him, said: “Whoever does not accept has disobeyed Allah and His Messenger” (1). Allah, Most High, says: “And whoever disobeys Allah and His Messenger has certainly strayed into clear error.” [al-Ahzab: 36] This is also due to the general wording of the Prophet’s statement: “When he invites you, accept his invitation” (2).
Question: Do invitation cards sent nowadays constitute specification of the invitee or not? The answer is: if you see that the name has been printed, you would say that this is a specified invitation. But if you see that they are unconcerned, and that it is merely a courtesy because you are a friend or relative—as evidenced by the fact that they do not come and ask, “Will you attend?” or, “Are you occupied?”—then it appears to me that the card has become like a general invitation, unless there is some other consideration, such as kinship, where failing to attend would be regarded as severing family ties, or people would say, “Why did he not come to his relative?”