Author |
|
bravedave Newbie
Joined: 05 September 2014 Location: Australia
Online Status: Offline Posts: 35
|
Posted: 20 March 2015 at 2:41am | IP Logged
|
|
|
This example shows reading a folder - eg. inbox
http://www.afterlogic.com/wiki/Getting_new_or_last_messages_(MailSuite_Pro)
and it works, but
if I use the Html() or Plain() functions on the message - it returns nothing
I think I should be able to write:
Code:
$oCollection->ForeachList(function ($oMessage) {
$oFrom = $oMessage->From();
echo "\t".htmlentities($oMessage->Uid().') '.$oMessage->Subject().($oFrom ? ' ('.$oFrom->ToString().')' : ''))."\n";
echo htmlentities($oMessage->Plain());
});
|
|
|
but that just return an empty string
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 20 March 2015 at 3:09am | IP Logged
|
|
|
This example is only about getting message headers, i.e. the information needed to display message list, message bodies are not downloaded. To display message body, you'd need to download the message first:
Code:
$oFullMessage = $oApiMailManager->Message($oAccount,$sFolder,$oMessage->Uid());
echo htmlentities($oFullMessage->Plain()); |
|
|
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
bravedave Newbie
Joined: 05 September 2014 Location: Australia
Online Status: Offline Posts: 35
|
Posted: 20 March 2015 at 3:22am | IP Logged
|
|
|
Thanks Igor - just what I needed
|
Back to Top |
|
|