Is it possible to catch delivery error with $this->email->send() used conditionally and $this->email->print_debugger()? Like this…
if (!$this->email->send()){
// Error
$this->email->print_debugger()
}else{
// Success
}
In my case if the recipient is a fake email address the send() function always return true. Mail protocol is set to standard php mail function, do i need to set config protocol to smtp?
Or am I asking something that must be done with a separate procedure (such as pipe bounce messages to a server dir and parse it later)?
The CI Email library doesn’t know whether the recipient is legit or not. Nor will any other library.
You can only know with a limited certainty when the mail is trying to be sent.
Your system mail log can tell some, bounces might tell some of the others but you will never know for sure even if the mail is sent and doesn’t gets bounced. You’d might be sending to a spamtrap, catchall or something third.
You should force recipients to validate their mail address, if you are doing recurring sends.