2011-08-04 70 views
1

對不起,我的英文。我無法使用自定義提取器獲取發件人姓名。我試圖從「from_email」和「body」部分獲取整個數據(用於測試目的)。結果只有電子郵件。正文沒有「發件人」部分,只有「數據」部分。使用Gmail自定義提取器無法獲取發件人姓名

這裏是我的提取:

<?xml version="1.0" encoding="UTF-8"?> 
<OpenCOBData id="SenderName"> 
<ExtractorSpec platform="gmail" language="en"> 

<Search input_type="text"> 
<Pattern input_fields="from_email,body"> 
<![CDATA[(?P<sender_name>.*)]]> 
</Pattern> 
</Search> 

<Response platform="gmail" format="cardgadget"> 
<Output name="senderName">{@sender_name}</Output> 
</Response> 
</ExtractorSpec> 

</OpenCOBData> 

這裏是清單的一部分:

<!-- EXTRACTOR --> 

<Extension id="EmailSenderNameExtractor" type="contextExtractor"> 
<Name>Email Sender Name Extractor</Name> 
<Url>781689580671:SenderName</Url> 
<Triggers ref="CustomExtractorGadget"/> 
<Scope ref="emailSenderAddress"/> 
<Scope ref="emailSenderName"/> 
<Scope ref="emailBody"/> 
<Container name="mail"/> 
</Extension> 


<!-- GADGET --> 

<Extension id="CustomExtractorGadget" type="gadget"> 
<Name>Person name extractor</Name> 
<Url>***</Url> 
<Container name="mail"/> 
</Extension> 


<!-- SCOPE --> 

<Scope id="emailSenderAddress"> 
<Url>tag:google.com,2010:auth/contextual/extractor/FROM_ADDRESS</Url> 
<Reason>This application searches the message body for any text.</Reason> 
</Scope> 

<Scope id="emailSenderName"> 
<Url>tag:google.com,2010:auth/contextual/extractor/FROM_PERSONAL</Url> 
<Reason>This application searches the message body for any text.</Reason> 
</Scope> 

<Scope id="emailBody"> 
<Url>tag:google.com,2010:auth/contextual/extractor/BODY</Url> 
<Reason>This application searches the message body for any text.</Reason> 
</Scope> 

有什麼不對?

回答