Bug fix to change config.Cache to config.Mail to check for Mail provider...

Bug fix to change config.Cache to config.Mail to check for Mail provider instance prior to creating a mail provider instance