I wrote one function to send mail in component. I have to add all the email when Email failed. How to add new file and add this error
if(!$mail->Send()) {
//echo "Mailer Error: " . $mail->ErrorInfo;
I need error log here
}else {
echo "Message sent!";
}