Skip to content

Commit

Permalink
nodata
Browse files Browse the repository at this point in the history
  • Loading branch information
buckelij committed Feb 25, 2024
1 parent 4fd5721 commit 2c55b3d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions smtp/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ func (s *Session) Reset() {}
func (s *Session) Logout() error {
for _, m := range s.Messages {
for _, domain := range strings.Split(config.mxDomains, ",") {
if len(m.Data) == 0 {
return nil
}
if strings.HasSuffix(m.Recipient, domain) {
log.Printf("FROM: %v TO: %v MESSSAGE: %v\n", m.From, m.Recipient, string(m.Data))
go config.blobClient.Put("mail/"+url.QueryEscape(domain)+"/"+url.QueryEscape(time.Now().String()), m.Data)
Expand Down

0 comments on commit 2c55b3d

Please sign in to comment.