[gmime-devel] Accessing attachments including inline-parts.
- From: Steve Kemp <steve steve org uk>
- To: gmime-devel-list gnome org
- Subject: [gmime-devel] Accessing attachments including inline-parts.
- Date: Fri, 23 May 2014 19:07:37 +0100
I've written to this list before, and received
great help, so fingers crossed I'm not doing something
silly.
I've written a mail-client which uses GMime successfully
for all its operations. Unfortunately I've received a
bug report regarding messages that contain :
* "Normal" attachments.
* Inline-attachments.
The current iteration over messages is simple, and
was built as a result of help I've received on this
list:
https://github.com/skx/lumail/blob/master/src/message.cc#L1220
In short I run :
iter = g_mime_part_iter_new...
do
{
GMimeObject *part = g_mime_part_iter_get_current (iter);
..
}
while( g_mime_part_iter_next (iter) );
I identify attachments by:
const char *filename = g_mime_object_get_content_disposition_parameter(part, "filename");
if ( filename != NULL )
{
.. attachment ..
}
As inline-parts don't contain filenames this results in the
inline-parts not being visible.
Is there a simple way that I can handle getting both "attachments"
and "inline parts"? I looked at the content-disposition functions,
but didn't see a simple way to go from there.
Steve
--
Debian GNU/Linux System Administration
http://www.debian-administration.org/
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]