The RSVP deadline should fall two to four weeks before your wedding.
And absolutely no later than two weeks before your wedding day. Around three to four weeks that way, they'll have plenty of time after initially receiving the invitation a few weeks prior to officially make up their minds and pull off travel accomodations if necessary. (And on the other hand, if you leave too much time between the invitation send and the RSVP date, you risk your guests putting it off and forgetting about it). You and your venue manager, caterer and wedding coordinator will want to connect around the two-week mark as well to finalize how many table settings will need to be arranged, and who will be seated where.
Giving your guests RSVP options.
Unfortunately, not everyone uses emails mail anymore. Besides an RSVP card tucked in your invitation, you can create a Guest list that links with your wedding website so your guests can RSVP online (and so you can organize your attendees in a multitude of ways, from keeping track of who gave you what gift to reception meal choices).