hua wrote:Congrats on the release Cristobal,
1. How to download GMail's body and attachments under a certain label?
These are the methods to use
METHOD List( cType, cLabel, cId, nMaxResults, lAdd ) // Generic method
METHOD ListMessages( nMaxResults, cLabel ) INLINE ::List( "messages", cLabel, , nMaxResults, )
METHOD ChatMessages( nMaxResults ) INLINE ::ListMessages( nMaxResults, "CHAT" )
METHOD DraftMessages( nMaxResults ) INLINE ::ListMessages( nMaxResults, "DRAFT" )
METHOD InboxMessages( nMaxResults ) INLINE ::ListMessages( nMaxResults, "INBOX" )
METHOD SentMessages( nMaxResults ) INLINE ::ListMessages( nMaxResults, "SENT" )
METHOD SpamMessages( nMaxResults ) INLINE ::ListMessages( nMaxResults, "SPAM" )
METHOD TrahsMessages( nMaxResults ) INLINE ::ListMessages( nMaxResults, "TRASH" )
METHOD UnReadMessages( nMaxResults ) INLINE ::ListMessages( nMaxResults, "UNREAD" )
Return the id of the messages on that label
Then you have to obtain the properties of the messages with the id obtained
Look sample in GGMAIL.PRG
//oMail:GetMessage( oMail:aMessages[ 10 ][ "id" ] ) // Replace this with your id
//? oMail:cMessage
Methods and datas in PDF doc