go-simple-mail icon indicating copy to clipboard operation
go-simple-mail copied to clipboard

Add methods to inspect body

Open jaskerv opened this issue 4 years ago • 3 comments
trafficstars

Hey, Firstly I would like to say that this is an awesome package.

I would to request a set of methods to access the msg body for both html and alternative/text. Would this be possible?

jaskerv avatar Jul 25 '21 23:07 jaskerv

Hey, you're welcome.

You can use the method GetMessage from Email struct to get a RFC822 formatted message.

If this is enough, it's ok, but if you want only the body, there isn't a method for that. I can achieve this in this week, PRs are welcome too

xhit avatar Jul 26 '21 13:07 xhit

Thanks for the quick response!

Currently I am inspecting the entire RFC822 message.

I'm just thinking it may be beneficial to have some getters to inspect message headers, body, and attachments for testing purposes.

jaskerv avatar Jul 27 '21 02:07 jaskerv

It's time to V3 so make all your ideas here: #53

xhit avatar Nov 18 '21 03:11 xhit

I have another package for that, see https://github.com/OfimaticSRL/parsemail

xhit avatar Jul 07 '23 00:07 xhit