Commit a204325c authored by Christophe Mathias's avatar Christophe Mathias
Browse files

fix: check that DEFECTDOJO_SMTP_SERVER has a value

parent b3fe8f4b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -421,7 +421,7 @@ variables:
      done
      log_info "$nb_new_vulns new vulnerabilities"

      if [[ -z $DEFECTDOJO_SMTP_SERVER && ${nb_new_vulns} -gt 0 ]]; then
      if [[ ! -z $DEFECTDOJO_SMTP_SERVER && ${nb_new_vulns} -gt 0 ]]; then
        log_info "set nb in mail template"
        sed -i 's/<<nb>>/'$nb_new_vulns'/' /tmp/mail.txt
        ssmtp "$GITLAB_USER_EMAIL" < /tmp/mail.txt