How to use IMAP in PHP to fetch mail body content?

前端 未结 2 1041
野性不改
野性不改 2020-12-13 07:39

I can\'t fetch email body content.

This is my code



        
相关标签:
2条回答
  • 2020-12-13 08:19

    The Zeta Mail component allows much more convenient fetching of mails from IMAP and POP and can parses the incoming emails into a nice and clean object structure so you can handle it easily.

    0 讨论(0)
  • 2020-12-13 08:29

    I had found solution, Error is with this line

    $message = imap_fetchbody($inbox,$email_number,2);
    

    Now, I am using

    $message = imap_fetchbody($inbox,$email_number, 1.2);
    

    To receive body content in text/html format

    Below i had given datails of available options. This might some one

    ()Root Message Part (multipart/related)
    (1) The text parts of the message (multipart/alternative)
    (1.1) Plain text version (text/plain)
    (1.2) HTML version (text/html)
    (2) The background stationary (image/gif)
    
    0 讨论(0)
提交回复
热议问题