curl-library
Re: attach a binary file to an email
Date: Sun, 2 Oct 2016 00:26:09 +0200 (CEST)
On Fri, 30 Sep 2016, Canellas wrote:
> Searching the web, I came to conclude that either I go deep into RFC 2045,
> or try to use another library.
That seems accurate. libcurl only handles the email *transport*: sending the
SMTP protocol stuff and the payload as *prepared by you*. You need to pass on
the correct email headers and body. To send binary files you need to send a
mime-formatted email body. libcurl will not help you produce such email body.
You need to find a tool/library that makes one.
A quick google showed me at least these library candidates (I've not used any
of them myself):
- libcmime - http://libcmime.org/
- gmime - http://spruce.sourceforge.net/gmime/
- mimetic - http://www.codesink.org/mimetic_mime_library.html (C++)
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2016-10-02