mirror of
https://github.com/wneessen/go-mail.git
synced 2024-12-22 18:50:37 +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/exec"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -532,7 +533,9 @@ func (m *Msg) WriteToSendmailWithContext(ctx context.Context, sp string, a ...st
|
|||
}
|
||||
_, err = m.Write(si)
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue