On 11-01-14 10:25, Алексей wrote: > Hello, friends. > > > DBMail v. 2.2.11 is installed on my server. I am not going to provide a > mail service using POP3 and IMAP, but I need to decode messages > “manually” (I’m working on a web interface for mail). What can you > advise me to decode messages directly from a database?
To get a raw message from the database in 2.2 is really easy: select messageblk from dbmail_messageblks where physmessage_id=? order by messageblk_idnr; will return two or more rows: the first row contains the full message header, the following rows the rest of the message. Concatenating all rows will result in the full message. For dbmail 3 it's much harder. Doing it against the database using queries is very far from trivial. To help developers avoid this problem I created the HTTP interface which will allow you - among other things - to do simple GET requests: /messages/<MESSAGE_ID>/view will return the full rfc2822 message. In contrib/dbmailclient.php and contrib/testdbmailclient.php you will find a lot of code that might help you. The HTTP interface is still considered experimental, so feedback and patches are very welcome. -- ________________________________________________________________ Paul J Stevens pjstevns @ gmail, twitter, github, linkedin * Premium Hosting Services and Web Application Consultancy * www.nfg.nl/i...@nfg.nl/+31.85.877.99.97 ________________________________________________________________ _______________________________________________ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail