我正在尝试获取尚未回复或转发的电子邮件列表(主题为RE:排除)。
以下是获取具有特定主题前缀的电子邮件列表的代码。 如何排除特定主题前缀需要做什么?
$currentRestriction->Contains = new EWSType_ContainsExpressionType();
$currentRestriction->Contains->FieldURI = new EWSType_PathToUnindexedFieldType()
$currentRestriction->Contains->FieldURI->FieldURI = 'item:Subject';
$currentRestriction->Contains->Constant = new EWSType_ConstantValueType();
$currentRestriction->Contains->Constant->Value = 'test';
$currentRestriction->Contains->ContainmentComparison = new EWSType_ContainmentComparisonType();
$currentRestriction->Contains->ContainmentMode = new EWSType_ContainmentModeType();
¤tRestriction->Contains->ContainmentMode->_ = EWSType_ContainmentModeType::PREFIXED;
答案 0 :(得分:1)
我已经明白了。 在上述代码前面添加以下两行将取消声明。
$currentRestriction->Not= new EWSType_NotType();
$currentRestriction = $currentRestriction->Not;