samlich Posted March 8, 2010 Share Posted March 8, 2010 I've been working on this problem for two days now. I feel like an idiot because this should be so simple but I can't find any info about it online or any examples of this type of command in any form anywhere. All I want to do is return a list of emails that match a imap_search() query. I am trying to search through an inbox to find emails that contain UPS tracking numbers. I can find no way (and coincidentally no documentation) to use a wildcard in a search string. In other words, in my script, something like this works: <?php $m_search=imap_search ($mail, 'BODY "comcast"') ?> And these return nothing: <?php $m_search=imap_search ($mail, 'BODY "comcas*"') ?> <?php $m_search=imap_search ($mail, 'BODY "comcas%"') ?> I feel like I've tried anything and really need some help. ANY guidance would be amazing. I will likely send cash / gifts to anyone who can help me on this... Thanks for reading. Link to comment https://forums.phpfreaks.com/topic/194479-imap_search-wildcard-question-driving-me-crazy/ Share on other sites More sharing options...
Mchl Posted March 8, 2010 Share Posted March 8, 2010 At quick glance it seems that this function does not support wildcards of any kind. Link to comment https://forums.phpfreaks.com/topic/194479-imap_search-wildcard-question-driving-me-crazy/#findComment-1022915 Share on other sites More sharing options...
samlich Posted March 8, 2010 Author Share Posted March 8, 2010 That is all I have been able to figure. Thanks a lot for the reply. Does anyone know any way to search an IMAP inbox with wildcards through PHP. I can't fathom that they wouldn't give you SOME option to do so... Link to comment https://forums.phpfreaks.com/topic/194479-imap_search-wildcard-question-driving-me-crazy/#findComment-1022920 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.