PHP Classes

show on php page body content with inline images and attachments

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  show on php page body content with...  >  (Un) Subscribe thread alerts  
Subject:show on php page body content with...
Summary:I need help to show the entire decoded message
Messages:4
Author:dellaemme
Date:2016-01-03 14:02:44
 

  1. show on php page body content with...   Reply   Report abuse  
Picture of dellaemme dellaemme - 2016-01-03 14:02:44
Hi,
the script is very powerful!
I have only a problem to show the entire body of email message in a php page...
If i set the savebody parameter the class saves the decoded message.
here's the code where i retrieve the body content:
if($mime->decode_bodies) {
if($mime->Analyze($decoded[0], $results)) {
$body=$results['Data'];
} else {
$body='MIME message analyse error: '.$mime->error."\n";
}
}
echo $body;

It's possible in this class to show the entire body of the email with the inline attachments like a email client shows the content of an email?

Thanks!

  2. Re: show on php page body content with...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-01-03 18:26:31 - In reply to message 1 from dellaemme
It is possible but the class does not do that.

You need to take the HTML part if there is one and display it replacing any cid: URLs with an URL that retrieves the respective body part.

  3. Re: show on php page body content with...   Reply   Report abuse  
Picture of dellaemme dellaemme - 2016-01-04 11:25:29 - In reply to message 2 from Manuel Lemos
Ok,
if I set the savebody parameter the class saves all the parts of the message.
It's possible to save only the attachments? If i set savebody the variable $results['Data'] looks empty
I just want to echo the message and save in a temp folder the attachments...

Thanks

  4. Re: show on php page body content with...   Reply   Report abuse  
Picture of Orletchi Victor Orletchi Victor - 2016-04-04 09:59:43 - In reply to message 1 from dellaemme
dear all,
that class is very useful,
but i'm new in that domain

and got 2 issues:
1) could you make an sample how to show message body on html page
2) how that class apply to message from email connected via IMAP (now I use Zend framework to connect)

tx in advance