Re: fetch body[1]

DINH Viêt Hoà <[email protected]> Sat, 22 May 2010 09:50:45 +0200
Newsgroups gmane.mail.libetpan.user
Message-ID <[email protected]>
--===============5881543671531976595==
Content-Type: multipart/alternative; boundary=0050450146f3b6301104872a101b

--0050450146f3b6301104872a101b
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Hi,

You can use the following :

uint32_t * value;

sec_list =3D clist_new();
value =3D malloc(sizeof(* value));
* value =3D 1;
clist_append(sec_list, value);
 section_part =3D mailimap_section_part_new(sec_list);
section =3D mailimap_section_new_part(section_part);
fetch_att =3D mailimap_fetch_att_new_body_peek_section(section);
fetch_type =3D mailimap_fetch_type_new_fetch_att(fetch_att);
 r =3D fetch_imap(_imap, uid, fetch_type, &text, &text_length);


On Fri, May 21, 2010 at 5:41 PM, Nadeem Shehzad <[email protected]>wrote=
:

>  hi guys,
>  I am trying to fetch msg with "mailimap_uid_fetch". It works fine for
> whole msg & or header.
> I want to fetch only the body part without attachment. How can this be
> done. Same thing
> what we do with command fetch 1 body[1].
> Can anybody help me out guys.
>
> Cheers.
> nadz
>
>
>
>
> ------------------------------
> Hotmail: Trusted email with Microsoft=92s powerful SPAM protection. Sign =
up
> now. <https://signup.live.com/signup.aspx?id=3D60969>
>
>
> -------------------------------------------------------------------------=
-----
>
>
> _______________________________________________
> Libetpan-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libetpan-users
>
>


--=20
DINH Vi=EAt Ho=E0
+33 6 87 06 91 88
83 rue Lamarck, 75018 Paris, France

--0050450146f3b6301104872a101b
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">H</span>i,</d=
iv><div><br></div><div>You can use the following :</div><div><span class=3D=
"Apple-tab-span" style=3D"white-space:pre"><br></span></div><meta charset=
=3D"utf-8"><div>
<span class=3D"Apple-tab-span" style=3D"white-space: pre; ">	</span>uint32_=
t * value;</div><div><br></div><div><span class=3D"Apple-tab-span" style=3D=
"white-space:pre">	</span>sec_list =3D clist_new();</div><meta charset=3D"u=
tf-8"><div>
<span class=3D"Apple-tab-span" style=3D"white-space: pre; ">	</span>value =
=3D malloc(sizeof(* value));</div><div><span class=3D"Apple-tab-span" style=
=3D"white-space: pre; ">	</span>* value =3D 1;</div><meta charset=3D"utf-8"=
><div><span class=3D"Apple-tab-span" style=3D"white-space: pre; ">	</span>c=
list_append(sec_list, value);</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space: pre; ">	</span></=
div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>s=
ection_part =3D mailimap_section_part_new(sec_list);</div><div><span class=
=3D"Apple-tab-span" style=3D"white-space:pre">	</span>section =3D mailimap_=
section_new_part(section_part);</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>fetch=
_att =3D mailimap_fetch_att_new_body_peek_section(section);</div><div><span=
 class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>fetch_type =3D =
mailimap_fetch_type_new_fetch_att(fetch_att);</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span></div=
><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>r =
=3D fetch_imap(_imap, uid, fetch_type, &amp;text, &amp;text_length);</div><=
div><br>
</div><br><div class=3D"gmail_quote">On Fri, May 21, 2010 at 5:41 PM, Nadee=
m Shehzad <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]">nad=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote=
" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">




<div>
hi guys,<br>=A0I am trying to fetch msg with &quot;mailimap_uid_fetch&quot;=
. It works fine for whole msg &amp; or header.<br>I want to fetch only the =
body part without attachment. How can this be done. Same thing<br>what we d=
o with command fetch 1 body[1].<br>
Can anybody help me out guys.<br><br>Cheers.<br>nadz<br><div class=3D"hm"><=
br><br><br> 		 	   		  <br><hr>Hotmail: Trusted email with Microsoft=92s po=
werful SPAM protection. <a href=3D"https://signup.live.com/signup.aspx?id=
=3D60969" target=3D"_blank">Sign up now.</a></div>
</div>
<br>-----------------------------------------------------------------------=
-------<br>
<br>
<br>_______________________________________________<br>
Libetpan-users mailing list<br>
<a href=3D"mailto:[email protected]">Libetpan-users@list=
s.sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/libetpan-users" tar=
get=3D"_blank">https://lists.sourceforge.net/lists/listinfo/libetpan-users<=
/a><br>
<br></blockquote></div><br><br clear=3D"all"><br>-- <br>DINH Vi=EAt Ho=E0<b=
r>+33 6 87 06 91 88<br>83 rue Lamarck, 75018 Paris, France<br>

--0050450146f3b6301104872a101b--


--===============5881543671531976595==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------


--===============5881543671531976595==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Libetpan-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libetpan-users

--===============5881543671531976595==--