It is not right to urge all professing Christians to go to the Lord's Table. There is such a thing as fitness and preparedness for the ordinance. It does not work like a medicine, independently of the state of mind of those who receive it. The teaching of those who urge all their congregation to come to the Lord's Table, as if the coming must necessarily do every one good, is entirely without warrant of Scripture. No, rather, it is a teaching which is calculated to do immense harm to men's souls, and to turn the reception of the Lord's Supper into a mere form. Ignorance can never be the mother of acceptable worship, and an ignorant communicant who comes to the Lord's Table without knowing why he comes, is altogether in the wrong place. "A man ought to examine himself before he eats of the bread and drinks of the cup."--"recognizing the body of the Lord,"--that is to understand what the elements of bread and wine represent, and why they are appointed, and what is the particular use of remembering Christ's death--is an essential qualification of a true communicant. God commands all people everywhere to repent and believe the Gospel (Acts 17:30), but He does not in the same way, or in the same manner, command everybody to come to the Lord's Table. No: this thing is not to be taken lightly, or carelessly! It is a solemn ordinance, and solemnly it ought to be used. The plain truth is that the Lord's Supper was not meant for dead souls, but for living ones. The careless, the ignorant, the willfully wicked, the self-righteous, are no more fit to come to the Lord's Table than a dead corpse is fit to sit down at a king's feast. To enjoy a spiritual feast we must have a spiritual heart, and taste, and appetite. To suppose that the Lord's Table can do any good to an unspiritual man, is as foolish as to put bread and wine into the mouth of a dead person. The careless, the ignorant, and the willfully wicked, so long as they continue in that state, are utterly unfit to come to the Lord's Supper. To urge them to partake is not to do them good but harm. The Lord's Supper is not a converting or justifying ordinance. If a man goes to the Table unconverted or unforgiven, he will be no better when he comes away (actually worse due to the associated judgments for coming unworthily). Taken in part from J.C. Ryle's book The Lord's Supper.
Other parts of his letter:
Why was the Lord’s Supper ordained?
Who ought to receive the Lord’s Supper?
What benefits are in receiving the Lord’s Table
What effects are in receiving the Lord’s Table
Warnings concerning the Lord’s Table