/**
  * Log Spam Notification
  *
  * @param Mail $mail
  * @return void
  */
 protected function logSpamNotification(Mail $mail)
 {
     if (empty($this->settings['spamshield.']['logfileLocation'])) {
         return;
     }
     BasicFileUtility::createFolderIfNotExists(BasicFileUtility::getPathFromPathAndFilename($this->settings['spamshield.']['logfileLocation']));
     $logMessage = $this->createSpamNotificationMessage($this->settings['spamshield.']['logTemplate'], $this->getVariablesForSpamNotification($mail));
     BasicFileUtility::prependContentToFile($this->settings['spamshield.']['logfileLocation'], $logMessage);
 }