It will be a hectic task if you are setting SQL Server Database mail on hundreds of server. Use this script to automate it.