I am using PHP 5.3.5 and I am using
$this->marubox=@imap_open($this->server,$this->username,$this->password);
The @ sign should turn off the error report, but it is not, and I am sure that the error occurs on this line. I want my application to recognize the problem on its own and respond and not receive NOTICE errors, and I cannot turn off error reporting for all PHP due to my company development policy.
Without @ I get:
imap_open () [function.imap-open]: Failed to open stream {pop3.seznam.cz:110/pop3►INBOX With it I get: Notification Unknown: Authentication failed (Authentication failed) (errflg = 1)
If the login information is approved, it opens a connection and no errors occur.
I always get a NOTICE error when imap_open fails to connect and this will ruin my JSON results. How to silence him?
source
share