Sidebar



en:objects:mail:imap:get_message_by_from_via_imap

get_message_by_from_via_imap

get_message_by_from_via_imap($folder,$from,$exactly=false,$number=0); - get a message with the specified sender via IMAP

The function accepts parameters as input:br>
  • $folder is the name of the IMAP folder
  • $from sender
  • $exactly – an exact match of the sender
  • $number – number of the email that meets the specified conditions (available from version 7.0.25)

    After testing, the function returns the result of its work to the script :
  • message – message (type XHEMailMessage) with the following fields:br>
      • from whom
      • subject - subject of message
      • date - date
      • body - the message text
    If there is no such message, the fields will be empty

    PHP example:

     

    Python example:

     

    C# example:

     

    Java Script example:

     
  • en/objects/mail/imap/get_message_by_from_via_imap.txt · Last modified: 2026/08/05 22:46 (external edit)