Author |
|
AIWEB Groupie
Joined: 19 October 2010 Location: United States
Online Status: Offline Posts: 54
|
Posted: 05 December 2010 at 8:30am | IP Logged
|
|
|
Is there an API method or chunk of code I could use as a method of posting an email message body? I
have been using a self built class to render the .eml files but it's buggy.. Maybe I can tap into the code
that webmail uses to parse the message and then I could maintain congruency.
something around the lines of the below would be great though it doesn't have to be that easy lol.
$user=new wm_user;
$user->getEmailByID(msg_id); //Returns content of message
I don't need attachments or anything just HTML/plain body of the message. Any help or direction would
be great!
Many thanks!
Ryan
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 06 December 2010 at 3:07am | IP Logged
|
|
|
According to the developers, there's no such method you could use straight away, and the approach you should take heavily depends on protocol type (IMAP/POP3) and synchronization mode you use. For instance, with Direct Mode used, messages are not stored in database or on filesystem, so it would be necessary to connect to mail server, locate particular mail, retrieve and parse it. To get the idea of how things like this are done, check common/class_processorswitch.php, you'd want to take a look at methods with names starting from Do.
Hope this helps!
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
AIWEB Groupie
Joined: 19 October 2010 Location: United States
Online Status: Offline Posts: 54
|
Posted: 06 December 2010 at 2:51pm | IP Logged
|
|
|
Interesting, I am using POP3 so I DO have the messages in file to work with. And ALL of my accounts will
be of this type. I did/do have an 80% working method using the files in /data/email. But it's ugly and
text/plain vs. text html throws up my script. I keep finding different header / content separator types and
probably brute forcing it too much.
I appreciate it, and will look into the class page you mentioned above.
Thanks a ton!
Ryan Thompson
|
Back to Top |
|
|