Enhance debug logging in sendmail function for improved clarity and output formatting
continuous-integration/drone/push Build is passing

This commit is contained in:
gyurix
2026-04-12 15:25:54 +02:00
parent 753eaeab10
commit c898454997
+3 -2
View File
@@ -46,8 +46,9 @@ RUN { \
echo ''; \
echo ' debug := os.Getenv("DEBUG") != ""'; \
echo ' if debug {'; \
echo ' fmt.Fprintf(os.Stderr, "[sendmail] relay=%s port=%s sender=%s recipients=%v\n", relay, port, sender, recipients)'; \
echo ' fmt.Fprintf(os.Stderr, "[sendmail] body:\n%s\n", body)'; \
echo ' fmt.Fprintln(os.Stderr, fmt.Sprintf("[sendmail] relay=%s port=%s sender=%s recipients=%v", relay, port, sender, recipients))'; \
echo ' fmt.Fprintln(os.Stderr, "[sendmail] body:")'; \
echo ' fmt.Fprintln(os.Stderr, string(body))'; \
echo ' }'; \
echo ''; \
echo ' if err = smtp.SendMail(relay+":"+port, nil, sender, recipients, body); err != nil {'; \