karastojko / mailio

mailio is a cross platform C++ library for MIME format and SMTP, POP3 and IMAP protocols. It is based on standard C++ 17 and Boost library.
Other
372 stars 98 forks source link

Please, could anyone provide me an example of how to get the mail content as a unencoded string? #140

Closed nigoolasi closed 11 months ago

nigoolasi commented 1 year ago

Please, could anyone provide me an example of how to get the mail content as a unencoded string? when i use the code below msg.format(msgbody)

i get an string encoded by base64,

yjm6560 commented 1 year ago

is msgbody original mime? if so, i think msg.parse(msgbody); std::cout << msg.content(); can help. if it doesn't work, do msgbody = "\r\n" + msgbody and try again

karastojko commented 11 months ago

The answer seems correct to me.