Searching for specific e-mail subject or containing variables #222
Replies: 2 comments 4 replies
-
For IMAP search, you can use search criteria like this For subject search Or multiple subject search For body search Unfortunately, mixing search for body and subject is not work from my experimental. For the simple search, see this example. Better solutionInstead of using IMAP search periodically, you can use IMAP IDLE for mailbox changes notification to get incoming new message. The Reply_Text.ino example scenario:One client will send email with specific word in the message subject to the second client. The second client connected to the IMAP server to listen to the mailbox changes. When the message from first client received by second client, the message subject will be compared with the specific word. If it matches, the second client will reply email to the first client. From the example, you can compare the strings of subject or text or html body of message with your desire string when message arrived by mailbox changes notification event.
For the simple email notification, see this example. |
Beta Was this translation helpful? Give feedback.
-
Is there a possebility to insert a string into the "void imapCallback(IMAP_Status status)" ? I can not get it to work when I try to write it like this "void imapCallback(IMAP_Status status, String subject) ". Or is there a different place to search for the desired subject? I saw that you also use this place but I also dont understand how "if (strcmp(msgList.msgItems[0].subject, sendingSubject.c_str()) == 0)" is working. sorry for so many questions |
Beta Was this translation helpful? Give feedback.
-
Hi guys,
I am currently working on a code for a ESP32 which is responsible for the communication of a machine as a graduation project. The esp32 is supposed to send e-mails to the employees, if the ESP32 gets any fault signals (digital signal). Employees can answer the e-mail to stop the continuous sending of the emails.
I can not find a way to search for our expected answered subject. The search script can not parse "AW: Lackierer 20230203 1300". I can also not find a way to return for example a boolean value if we would find the expected subject.
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions