libcmime  
A lightweight C mime library
create_mime_message_skeleton_add_attachment.c