mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 13:50:49 +01:00
Still trying to fix the GH issues with MacOS' broken pipe
This commit is contained in:
parent
8f9fc61c1e
commit
e379128c83
1 changed files with 4 additions and 1 deletions
5
msg.go
5
msg.go
|
@ -12,6 +12,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -532,7 +533,9 @@ func (m *Msg) WriteToSendmailWithContext(ctx context.Context, sp string, a ...st
|
||||||
}
|
}
|
||||||
_, err = m.Write(si)
|
_, err = m.Write(si)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to write mail to buffer: %w", err)
|
if !errors.Is(err, syscall.EPIPE) {
|
||||||
|
return fmt.Errorf("failed to write mail to buffer: %w", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the stderr pipe for possible errors
|
// Read the stderr pipe for possible errors
|
||||||
|
|
Loading…
Reference in a new issue