php - Gmail Oauth API get messages count -
the new gmail api allows message count total emails , unread emails within label. can't work , tried lots of things. it's connected oauth correctly can't count work. i'm using below code:-
$labelall = $service->users_labels->listuserslabels('me'); $labels = $labelall->getlabels(); foreach ($labels $label) { print 'label id: ' . $label->getid() . ', number of messages:'.$label->getmessagestotal().'<br/>';}
can help? lists labels correctly message count returns null.
thanks!
not fields set list() response--in case, have labels.get() on label care counts.
php google-oauth gmail-api
No comments:
Post a Comment