是否可以声明多个
FROM
标准?
我已经尝试过:
$emails = imap_search($imap, 'FROM "[email protected]" FROM2 "[email protected]"');
$emails = imap_search($imap, 'FROM "[email protected],[email protected]"');
$emails = imap_search($imap, 'FROM "[email protected]" OR FROM "[email protected]"');
这些都不起作用。有谁知道解决办法吗
以前从未使用过 imap,但你可以尝试这样的东西吗?
$from = array("[email protected]", "[email protected]");
$emails = array();
foreach($from as $search){
$emails[] = imap_search($imap, 'FROM "'.$search.'"');
}
$emails = imap_search($connection, OR FROM "@domain.pt" FROM "user@any_domain.pt" );
这将仅过滤从任何用户 od domain.pt 和用户 user@any_domain.pt 收到的邮件
为我工作,希望它对你也有用。