Rajkumar Teckraft
Rajkumar Teckraft

Reputation: 69

How to get CC and BCC email addresses from Gmail Contextual Gadget

We are using Gmail Contextual Gadgets in our organization.While using the gadget I am able to fetch sender email address and body, subject of the mail but unable to get the CC and BCC email Ids.

Can some one help on this issue.

this my following snippet:-

 matches = google.contentmatch.getContentMatches();
  for (var match in matches) {
        for (var key in matches[match]) {
          if( key =="sender_email")
            {
            email_id =matches[match][key];
          }
         if(key == 'recipient_to_email')
           {                        
            from_email  =matches[match][key];
            }
          if(key == 'recipient_cc_email')
           {                        
            cc_emails  =matches[match][key];
           }
         if(key == "email_body")
            {
            email_body =matches[match][key];                    
            }
          if(key == "subject")
            {
            subject =matches[match][key];                   
            }
          if(key == 'message_id')
            {
             msg_id = matches[match][key];                      
            }
         }
    }

I am using the following Extractors of Google
google.com:SubjectExtractor
google.com:MessageIDExtractor
google.com:SenderEmailExtractor
google.com:RecipientToEmailExtractor
google.com:EmailBodyExtractor
google.com:RecipientCCEmailExtractor

Upvotes: 1

Views: 328

Answers (1)

Rajkumar Teckraft
Rajkumar Teckraft

Reputation: 69

Finally my issue has been resolve when I use

Extractor : google.com:RecipientCCEmailExtractor

and scope : recipient_cc_email

To fetch the BCC email id there is no extractor and scope available in Gmail extrators.

or you can use Extractor : google.com:RecipientEmailExtractor and scopes : recipient_email

Upvotes: 1

Related Questions