The issue is in the MailController file.. when sending an email you should have the following line as it is written next, being the first variable $account->getSyncServer() instead of $sync_server or alike.
$check_sync_box = MailUtilities::checkSyncMailbox($account->getSyncServer(), $account->getSyncSsl(), $account->getOutgoingTrasnportType(), $account->getSyncSslPort(), $account->getSyncFolder(), $account->getSyncAddr(), $account->getSyncPass());
Best regards,
Francisco