php1 Posted October 28, 2008 Share Posted October 28, 2008 i am using php imap_fetchbody() function to read my email message. php code: $mbox = imap_open ($server,$user, $pass) or die("can't connect: " . imap_last_error()); $text=imap_fetchbody($mbox,$i,"1"); echo $text; output: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//DE"> <HTML> <HEAD> <=META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii">= <TITLE>Message</TITLE> </HEAD> <BODY>Testing <=br> </BODY> </HTML> when i use $text=strip_tags(imap_fetchbody($mbox,$i,"1")); i got the output as : =MessageTesting ie there is a term =Message with all my email messages. How to avoid this? Link to comment https://forums.phpfreaks.com/topic/130384-problem-with-reading-email/ Share on other sites More sharing options...
GKWelding Posted October 28, 2008 Share Posted October 28, 2008 Nope, you just have an error in your HTML template you're using. Replace it with this... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//DE"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii"> <TITLE>Message</TITLE> </HEAD> <BODY>Testing<br> </BODY> </HTML> you had a couple of spurious = signs in there for some reason. Link to comment https://forums.phpfreaks.com/topic/130384-problem-with-reading-email/#findComment-676521 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.