Alert Deadlock

Hi SQL team anybody help

how to find and give deadlock alert throw mail id and give the detail like which user, table name, database name, queries.

check this
How to receive Deadlock information automatically via email – SQLServerCentral

How to get detail like database name and user name while deadlock occured.

I need information like database name ,table name and user name while deadlock occured.