Skip to main content

Names from a Digital Hat

So going on the second year now instead of everybody giving everybody else gifts and having a hard time money-wise and what to get who, we thought it best to do sort of a "secret santa" thing and allow one big gift. So instead of having to buy quite a few separate gifts of varying quality and cost, we instead get one nice gift for a specific person. This process had some obvious rules:

  1. Can't get yourself
  2. Can't get your spouse
  3. Children aren't included

These were the rules we went by. For rule #3 we simply didn't put the children's names in the hat. For 1 and 2, we kept having to repick if the name wasn't appropriate. This also might mean completely redoing everything if there were no options when it got down to the last couple names.

This gave my sister and I the idea to simply do it all on the computer and have it automatically send out the emails. So...Here it goes:

Technologies Used:

  • .NET 4.0
  • WPF
  • CDO (old, but System.Net.Mail wouldn't function with gmail)

The program enumerates all possibilities and chooses one at random. It allows exclusions for things like spouses. This has only been through limited testing.

DigitalHat.zip21.87 KB