bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-mailutils] Problem in settting flags ( Read/Unread) for the mails i


From: Chaganti Chaganti
Subject: [bug-mailutils] Problem in settting flags ( Read/Unread) for the mails in maildir format
Date: Tue, 31 Oct 2006 10:54:35 +0800

Hi,

Greeetings!!

I am using Mailultils-1.0 version and using the mailbox format as Maildir

I do have problem in setting the read and Unread flags.After setting the read flag for a mail, and flusing the mail status is Status : 0R ( ie. setting the mail as read )

setting the flags using the following API's from mailutils...

// this is for setting flag as read
mu_attribute_t attr = 0;
status = mu_message_get_attribute( msg, &attr );
mu_attribute_set_read( attr );
mu_attribute_destroy( &attr, NULL );

// after setting the status the mail looks like.......
Return-Path: <address@hidden>
Delivered-To: address@hidden
Received: (qmail 26574 invoked by uid 89); 12 Jun 2006 03:36:21 -0000
Received: by simscan 1.2.0 ppid: 26553, pid: 26563, t: 3.5079s scanners:
    clamav: 0.88.2/m:38/d:1428
Received: from unknown (HELO ?192.168.123.124?)
    (address@hidden@61.8.208.33) by mailbox.aaa.com with ESMTPA; 12
    Jun 2006 03:36:17 -0000
Subject: Re: Regarding Starteam Access
From: AAA <address@hidden>
To: address@hidden>
Cc: address@hidden>
In-Reply-To: <address@hidden>
References: <address@hidden>
     <address@hidden> <address@hidden>
     <address@hidden>
Content-Type: multipart/mixed; boundary="=-q0RIsBFHCUTrSoMnDjun"
Message-Id: <address@hidden>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2)
Date: Mon, 12 Jun 2006 11:39:52 +0800
X-Evolution-Source: pop://address@hidden
X-Evolution: 000001aa-0071
X-IMAPbase: 0 46
X-Envelope-Date: Mon Jun 12 03:36:21 2006
X-Envelope-Sender: address@hidden
Status: OR

// the following steps are for setting as unread
mu_attribute_t attr = 0;
status = mu_message_get_attribute( m_message, &attr );
status = mu_attribute_unset_seen( attr );
status = mu_attribute_unset_read( attr );
mu_attribute_destroy( &attr, NULL );

After Unset the mail looks like

.........
.............
same as above...

Status : O

when I tried to find whether the flag is read or unread or seen .... etc ... using the API's

///an example method
void getFlag ( char & flag )
{
....
.....
mu_attribute_t attr = NULL;
mu_message_get_attribute( msg, attr );
if ( mu_attribute_is_deleted( attr ) )
    {
        flag = 'D';
    }
    else if ( mu_attribute_is_read( attr ) )
    {
        flag = 'R';
    }
    else if ( mu_attribute_is_seen( attr ) )
    {
        flag = 'S';
    }
    else if ( mu_attribute_is_recent( attr ) )
    {
        flag = 'N';
    }

 cout << "Flag is :" << flag << endl;
}

Flag is : N  /// always same status, even after chaging the status using the above API's

though the mail was set Read, always mu_attribute_is_recent( attr ) is satisfied and returning the value 'N' ( for new mail ) in above example. and mu_attribute_is_read( attr ) was not at all satisfied! and returning 'R' ( for read mail ) as status for the mail which was set Read already.

can anyone help me out ?

Thanks and regards
reply via email to

[Prev in Thread] Current Thread [Next in Thread]