Harald and Paul, thanks for your answer. > instead re-invent the wheel I don't want to do it, so I ask you about existing solution :) I discovered some functions in PHP but all of them work with an IMAP handler. I need the same function or (rather) library to do the same things but without an IMAP connection. There's no reason to open an IMAP connection if it uses MySQL anyway. I think so... > why dbmail 2.2.11? I can't exactly answer you this question. I started to work with DBMail 2.2 and then I had no reason to upgrade it. If 3.0 can solve my problem it would be great. > To get a raw message from the database in 2.2 is really easy: Yes, I know. Thanks. I need to present a text I got from my database for an end-user in a mail interface (using no IMAP). > contrib/dbmailclient.php and contrib/testdbmailclient.php Paul, do these scripts display unformatted message (as rfc2822)?
Alexey Zverev On 11 January 2014 17:29, Paul J Stevens <p...@nfg.nl> wrote: > 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 >
_______________________________________________ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail