Some background - I am trying to use the Gmail rest API to send an email with curl/libcurl. I am able to send a regular plain text email, but I am struggling to make sense of the API docs regarding attachments.
The API requires the email message to be passed in RFC 2822 format. I know almost nothing about this format, but I'm trying to learn. It just dawned on me that the reason why the Gmail API doesn't deal explicitly with attachments could be because RFC 2822 deals with attachments instead.
My question is - does RFC 2822 include the format of attachments as part of the email? If so then I would love to see an example message with a few header fields, a simple body and a simple text file as an attachment. Could anyone point me at such an example for beginners.