|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-02-13 05:55 UTC] vikas at indiamart dot com
Hi, I am using web-based interface to display mails using IMAP The module calls the function "imap_header" for each mail and then displays output in required format. But for few mails, which were sent without a TO address, and has only BCC address (can be done using Eudora), the interface shows the following warning ################## Warning: Unterminated mailbox: Undisclosed-Recipient@ho.trivenigroup.com (errflg=3) in Unknown on line 0 Warning: Unexpected characters at end of address: :;@vd1.vsnl.net.in;> (errflg=3) in Unknown on line 0 ##################### The mail that caused this, has the following headers ################## Reply-To: "Pramoda Kumar Rai" <pramod@texporttechnologies.com> From: "Pramoda Kumar Rai" <pramod@texporttechnologies.com> To: <Undisclosed-Recipient:;@vd1.vsnl.net.in;> Subject: Fw: McAfee Newsletter Date: Sat, 2 Feb 2002 22:17:37 +0530 Organization: Texport Technoligies Pvt. Ltd. MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 ################# I found the similar error at many places but no solutions. Is there any solution to atleast prevent the warning from being displayed.. Thanks Vikas Aggarwal PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 20:00:02 2025 UTC |
Hi, I am already using the function as ############## for ($i = $begin, $j = $beginIndex; $i <= $end; $i++, $j++) { $msgnum = $sorted[$i-1]; $h = @imap_header($imp->stream, imap_msgno($imp->stream, $msgnum)); ... and further } ############## But for a mail message that is sent without any TO and only BCC, the function returns a warning (as already shown in the message placed initially) because such mails have TO field as To: <Undisclosed-Recipient:;@vd1.vsnl.net.in;> And the function is not able to handle it. Please suggest what to do to overcome this. To get this error, jsut send a mail to some account with email-address in BCC field only and then see mails using some IMAP web interface. Thanks Vikas AggarwalWell, look at the code yourself. This error message comes from the imap libraries and not from PHP. It is displayed by PHP through the mm_log() callback which is wrapped like this: void mm_log(char *str, long errflg) { ERRORLIST *cur = NIL; TSRMLS_FETCH(); if (!(EG(error_reporting) & E_NOTICE)) { return; ie. it will only display if E_NOTICE is turned on. So PHP is correct in that it only optionally displays these. You must not have turned E_NOTICE off correctly.