Does this package support fetching of attachments?
avishbran opened this issue · comments
avishbran commented
JP Robinson commented
Howdy @avishbran
eazye
does not provide any extra funcs or methods to parse attachments, but you could use mime/multipart
to traverse the parts of the mail.Message
struct embedded in eazye
's Email
type to find and read an attachment on an email.
Glenn Wilkinson commented
I don't suppose you have an example of parsing attachments?
JP Robinson commented
Nothing that's open source/written in the last 5 years 😅
I believe it comes down to using https://golang.org/pkg/mime/multipart/#Reader to iterate to/read in each "part" of the message. I believe the headers of each part should let you know if the contents are an attachment and how things are encoded so you can decide to read/decode the payload.