I am new to use phpmailer for sending bulk mails. The execution stops and shows error if send() fails.
Is there any way to skip the error and continue with next email id. I am using email id's from database.
On
In PHP, you can suppress error display by adding @ to the function. This will usually prevent the error from being displayed.
For your situation, you can put the code in try..catch. In the catch section, check if the all the emails have been sent; if not, just continue with the next one. This also means that you need a way to track the total emails and the number of emails completed.
Hope this helps.
You Can Catch Exception Mechanism, to continue with next Mail with appropriate logic
Posted by Phil PHPMAiler uses Exceptions. Try to adopt the following