You can automatically send an email to
customers when they select an out of stock item and that product becomes
in stock again. Simply, go to Settings > Store Settings >
Storefront Settings, check the box next to "Notify when product is in
stock: [ ]" and Save Changes as shown below.
Whilst the 'Notify when product is back in stock' setting is a
global store setting, it will only work if the element have been added
to your product detail page design. This is because each store design is
different and the feature can effect the page layout. See example of
element on product detail page page design below.