Config.php error - emails not working

Here is the error message I get when I change debug to TRUE in config.php.

Email is not working even on the test email, and invite users email... The data is corrupt that is sent to my SMTP server and is returned....

Failed to connect to database
Error params:
File: /home/content/m/i/k/mikewcassidy/html/switcheroo/projectpier/environment/library/database/adapters/MysqlDBAdapter.class.php
Line: 32
Backtrace:
#0 /home/content/m/i/k/mikewcassidy/html/switcheroo/projectpier/environment/library/database/adapters/AbstractDBAdapter.class.php(40): MysqlDBAdapter->connect(Array)
#1 /home/content/m/i/k/mikewcassidy/html/switcheroo/projectpier/environment/library/database/DB.class.php(95): AbstractDBAdapter->__construct(Array)
#2 /home/content/m/i/k/mikewcassidy/html/switcheroo/projectpier/environment/library/database/DB.class.php(66): DB::connectAdapter('mysql', Array)
#3 /home/content/m/i/k/mikewcassidy/html/switcheroo/projectpier/init.php(108): DB::connect('mysql', Array)
#4 /home/content/m/i/k/mikewcassidy/html/switcheroo/projectpier/index.php(9): require('/home/content/m...')
#5 {main}
Autoglobal varibles:
$_GET:
$_POST:
$_COOKIE: Array (
  ['id33bab15e11fa3cc5b8f6b988b978d65eefec763c'] => (string) '1'
  ['33bab15e11fa3cc5b8f6b988b978d65eefec763c'] => (string) '9b7ef608a45f89e3e614c5bd8f5741f7da552a4e'
  ['remember33bab15e11fa3cc5b8f6b988b978d65eefec763c'] => (string) '1'
  ['id'] => (string) '1'
  ['remember'] => (string) '1'
  ['token'] => (string) 'd1edd2e4c43948aba92c3d53bf3894a3fb1bfefe'
  ['PHPSESSID'] => (string) 't51m9d4fifi2h40vt02iv0aum5'
)
$_SESSION:
Execution time:
Total execution time: 0.154312 seconds

anyone know what this could be?

thanks

The error message 'Failed to connect to database' suggests that there's something wrong with your database credentials.
Make sure that you haven't accidentally changed them while enabling debug.