Trying out your work (thanks for that!) I run into the problem, that sending a note or annotated pdf worked, but attachement was somehow corrupted. I figured out that e.g. microsoft email server did deliver the attachement correct, while my kopano server corrupted it always after 6kB. Finnaly sending it to an web.de account pointed me in the right direction by denying it with message 501 Syntax error - line too long. --> data send to email server needs to be split up in multiple lines after 76 characters.
Trying out your work (thanks for that!) I run into the problem, that sending a note or annotated pdf worked, but attachement was somehow corrupted. I figured out that e.g. microsoft email server did deliver the attachement correct, while my kopano server corrupted it always after 6kB. Finnaly sending it to an web.de account pointed me in the right direction by denying it with message 501 Syntax error - line too long. --> data send to email server needs to be split up in multiple lines after 76 characters.
Searching around I stumpled across https://medium.com/wesionary-team/sending-emails-with-go-golang-using-smtp-gmail-and-oauth2-185ee12ab306 and I borrowed the chunkSplit function and integrated it into smtp.go "attached" at the end.
As I am new to github please push me to the right way in adding my comments, please.