Other: Add SMTP debug dump to disk

This commit is contained in:
James Houlahan
2022-12-14 10:56:54 +01:00
parent 7a814faed2
commit f551732a17
3 changed files with 60 additions and 0 deletions

View File

@ -66,6 +66,9 @@ func (user *User) sendMail(authID string, from string, to []string, r io.Reader)
return fmt.Errorf("failed to read message: %w", err)
}
// If running a QA build, dump to disk.
debugDumpToDisk(b)
// Compute the hash of the message (to match it against SMTP messages).
hash, err := getMessageHash(b)
if err != nil {