The emails with pin codes are sent out randomly by the marketing department. There's not a lot you can do, other than registering with the Disney website, to increase your chances. Marketing picks a certain demographic, such as guests from the Northeast or Midwest US, and that's who gets blasted with the emails. Your best bet is to keep an eye on the DIS so you're in the know about any public codes you qualify for, and make sure you are registered on the Disney website. After that, it's all in where the pixie dust falls!