I made a project based on the above idea and I thougt I would share it here. Also I am using a 9V battery to power this and the batery runs out quite fast, because of the IR transmitter I suppose. Is there any way I can make the battery last longer.
http://www.ingenstech.com/projects/letter-box-monitoring-alerting-system/
http://www.ingenstech.com/projects/letter-box-monitoring-alerting-system/