It is necessary to write a program in C ++ using the libcurl library, which will send out emails with some text and an attached PDF file. I figured out the text (there are some good examples), but the file attachment technology did not win.

It is clear that you need to somehow build the headers.

From: <ivanov@mail.ru> To: <petrov@mail.ru> Subject: Sample message Content-type: text/plain; charset=utf8 Message text Content-type: application/pdf ????? 

But what to write instead of question marks, and whether to write it there at all is a question. Tell me what the message structure should look like.

  • 2
    For simplicity, take any email with an attachment and see how it is done. - Harry
  • How is this easiest to do? - AccumPlus
  • 2
    Yes, save the letter to a file and look inside ... - Harry
  • Thank you) I didn’t even know about such a possibility) - AccumPlus

0