Internet connected mailbox that sends an email when mail is put into the box.

In these modern times of instant messaging we still receive standard mail. 
Wouldn't it  be convenient to know when new mail has arrived?
At home, our mailbox is located at drive way about 10 meters away from the house. 
It should be in range of the WIFI network and connect the ESP32
The mailbox has two lids:
The cover: an outer covering lid that shields the mailbox from rain.
The inner door:  an inner lid that closes the box an has the mail slot.
The idea is to make a detection switch that triggers when the cover is opened. 
and another switch that triggers when the inner door is opened.
When the mail is delivered the cover is opened and the mail is dropped through the slot. 
The cover switch will trigger and this can start the sending of e.g. an email.
When the inner door is opened the seccond switch could reset the mailbox status.
Could log events to a server. Send message as tweet etc.

( have to get acquainted with the ESP32 first.)
First steps: 
- Test wifi connection / range
- Test email sending 
- Do breadboard test.
- Find weather proof switches and housing.