我需要检查收件箱中的垃圾邮件并阅读每封电子邮件的电子邮件正文,并根据关键字“结算和加载”在CRM中创建一个案例,我有一个用于从Gmail阅读邮件的工作代码,但排序一直是问题。
我有这段代码
foreach($emails as $email) {
$headerInfo = imap_headerinfo($connection,$email);
$message= imap_fetchbody($connection , $email,1);
if (preg_match('/Bill|load/', $message)) {
if (strpos($message, 'Bill')) {
echo 'billing related issue';
}elseif (strpos($message, 'load')) {
echo 'Loading related issue';
}
}else echo 'doesn\'t exists</br>';
}
此代码检查所有邮件,查找关键字但检查结算或加载,而不是两者。请帮帮我。
答案 0 :(得分:1)
这里不需要<div class="col-lg-4">
<div class="input-group">
<input type="text" class="form-control" id="SearchString" name="SearchString" placeholder="Search String"/>
<span class="input-group-btn">
<button class="btn btn-default" type="button">Search</button>
</span>
</div>
</div>
。 SELECT
SUM(kg*rep*sett) as weight,
SUM(kg/max) as avg,
SUM(rep*sett) as reps,
t.date,
pk.peak
FROM Test t
INNER JOIN (SELECT MAX(kg / max) as peak, date FROM Test WHERE date BETWEEN @0 AND @1 AND exercise < 4 group by date) as pk
on t.date = pk.date
WHERE t.date BETWEEN @0 AND @1 AND exercise < 4
GROUP BY t.date, pk.peak
将按预期方式运作: -
window.oldImage = $image.attr("src");