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

Expose Msg attachments fields #63

Closed dhia-gharsallaoui closed 1 year ago

dhia-gharsallaoui commented 1 year ago

This PR introduces a couple of new methods on the Msg. This will help the Msg.Middleware to deal with Msg attachments.

To get the Msg attachments, we can now use the Msg.GetAttachments() methods to get the list of currently assigned attachments to the Msg.

To set the Msg attachments, we can now use the Msg.SetAttachments() methods to set a list of *File as Msg attachments.

dhia-gharsallaoui commented 1 year ago

@wneessen feel free to check and review.