Enhance debug logging in sendmail function for improved clarity and output formatting
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
+3
-2
@@ -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 {'; \
|
||||
|
||||
Reference in New Issue
Block a user