forget it instad the low-level crap http://www.php.net/manual/en/book.imap.php the extensions name is misleading - it supports POP3 as well
$raw_message = imap_fetchheader($mail_connection, $msgid) . imap_body($mail_connection, $msgid); gives the clean raw-source which can be opended in any mail-client so from now on a can provide messages retrieved with IMAP or POP3 to help Paul debug issues in case of specific messages easier see screenshot of a small webinterface :-) ___________________________________________________________- confirms again that with snapshot e84cfd46a08a7c1fa8da15426524c7f8e508ac4a there is a difference between IMAP/POP3 for a specific message Paul has a copy of it - the commit itself promises to solve the empty-body-problem of Apple Mail for random messages > ---Apple-Mail=_3A2FC16D-D077-44C8-A239-A7B36A86540F-- > - > --Apple-Mail=_E6A72268-1DAC-4E40-8270-C4CBE68157E0-- Am 23.08.2013 00:18, schrieb Reindl Harald: > OK with fread($fp, 100000000); instead of fgets() that looks > different but these are only pieces of the message > > is there a simple IMAP and finally POP3 command to > retrieve a *complete* message as RAW source like > "view source" in thunderbird without implement > full RFC's and whatever parsing on the client? > > Am 22.08.2013 23:54, schrieb Reindl Harald: >> i try do include a simple POP3/IMAP debug tool to get >> the RAW message source in our admin-backend but IMAP >> does not love me >> >> why do i not get any response after the "fetch" command >> while the debug-log shows something is retrieved from >> the DB which matches the message in question >> >> Aug 22 23:51:33 srv-rhsoft.rhso dbmail-imapd[16139]: [0x7f73edc4a4f0] >> Debug:[imap] _fetch_headers(+725): >> [0x7f73edcb67c0] for 167205 [(Newsgroups Content-MD5 Content-Disposition >> Content-Language Content-Location >> Followup-To References)] >> Aug 22 23:51:33 srv-rhsoft.rhso dbmail-imapd[16139]: [0x7f73edc4a4f0] >> Debug:[imap] _send_headers(+652): >> [0x7f73edcb67c0] [(Newsgroups Content-MD5 Content-Disposition >> Content-Language Content-Location Followup-To >> References)] [References: <4FD82EEA.7060609@ >> ______________________________________________ >> >> outputs of the PHP-fwrite()-commands below >> >> * OK [CAPABILITY IMAP4 IMAP4rev1 ACL RIGHTS=texk NAMESPACE CHILDREN SORT >> QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE >> STARTTLS AUTH=CRAM-MD5 AUTH=DIGEST-MD5 AUTH=LOGIN AUTH=PLAIN] >> 1 OK [CAPABILITY IMAP4 IMAP4rev1 ACL RIGHTS=texk NAMESPACE CHILDREN SORT >> QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE] >> User [email protected] authenticated >> * 8 EXISTS >> * 0 RECENT >> ______________________________________________- >> >> if($msgid > 0) >> { >> echo '<div style="white-space:nowrap;">' . MY_LE; >> switch($protocol) >> { >> case 'IMAP': >> $fp = @fsockopen($dbmail->imap_hostname, 143, $errno, $errstr, 1); >> if($fp) >> { >> echo fgets($fp) . '<br />' . MY_LE; >> fwrite($fp, '1 login "' . $username . '" "' . $user_data['password'] >> . '"' . "\n"); >> echo fgets($fp) . '<br />' . MY_LE; >> fwrite($fp, '2 EXAMINE "INBOX"' . "\n"); >> echo fgets($fp) . '<br />' . MY_LE; >> fwrite($fp, '3 fetch ' . $msgid . ' ALL' . "\n"); >> echo fgets($fp) . '<br />' . MY_LE; >> } >> echo '<br />' . MY_LE; >> break; >> case 'POP3': >> break; >> } >> echo '</div>' . MY_LE; >> }
<<attachment: screenshot.png>>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ DBmail mailing list [email protected] http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
