wneessen / go-mail

📧 Easy to use, yet comprehensive library for sending mails with Go
https://go-mail.dev
MIT License
571 stars 44 forks source link

Refactor DSN handling from client.go to smtp.go #104

Closed wneessen closed 1 year ago

wneessen commented 1 year ago

This PR refactors the DSN (RFC 1891) SMTP client handling, that was introduced in https://github.com/wneessen/go-mail/commit/f4cdc61dd04afb35e378877f25ec09eff78a18c6.

While most of the Client options stay the same, the whole workaround logic for the SMTP client has been removed and added as part of the SMTP client instead.

This way we got rid of the duplicate/redundant Client mail(), rcpt(), dsnRcpt(), dsnMail() methods as well as the copies of the cmd() and validateLine() methods. The Client is now using the proper Mail() and Rcpt() methods of the SMTP client instead.