I am using curl library for email sending. I am able to send email successfully. I can see FROM, Subject and body properly at receiving end. Now my need is for attachment in the email. I have followed in this way: http://msdn.microsoft.com/en-us/library/ms526560(v=exchg.10).aspx
static const char *text[]={
"Date: Wed, 06 Feb 2013 12:30:30 +1100\n",
"To: " RECIPIENT "\n",
"From: " MAILFROM "\n",
"MIME-Version: 1.0",
"Content-Type: multipart/mixed",
"boundary=""XXXXX""\n",
"Subject: email example message\n",
"--XXXXX",
"\n", /* empty line to divide headers from body, see RFC5322 */
"The body of the message starts here.\n",
"Check RFC5322.\n",
"--XXXXX",
"Content-Type: text/plain" "\n",
"Content-Disposition: attachment" "\n",
"filename="FILE_PATH "\n",
"--XXXXX--",
NULL
};
They are suggesting RFC5322. But in that I could not find anything like attachment. Is it correct? Any other way using libcurl + C language is also welcomed.
I think the person named as Jorge has asked same kind of question on october 13,2012. But the answer is not there.