I am reading mails from a specific mail id using IMAP function.But i am not able to read the mail content for plain text mails. It ‘s s working perfect
IMAP
plain text
Your problem is this line:
$msg = imap_fetchbody($inbox,$email_number,1.2);
1.2 is TEXT/HTML email part, which is used for html email body.
1.1 is TEXT/PLAIN - plain text email body - for plain text messages you'll need to use this one.