mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-23 14:10:50 +01:00
Remove redundant nil check for SMTP client
The removed check for a nil SMTP client was redundant because the previous error handling already covers this case. Streamlining this part of the code improves readability and reduces unnecessary checks.
This commit is contained in:
parent
c61aad4fcb
commit
6ebc60d1df
1 changed files with 0 additions and 3 deletions
|
@ -1017,9 +1017,6 @@ func (c *Client) DialToSMTPClientWithContext(ctxDial context.Context) (*smtp.Cli
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if client == nil {
|
||||
return nil, fmt.Errorf("SMTP client is nil")
|
||||
}
|
||||
|
||||
if c.logger != nil {
|
||||
client.SetLogger(c.logger)
|
||||
|
|
Loading…
Reference in a new issue