We inherited an older PHP application. It is an online shop application coded in weird style. Each mail procedure has been coded into the responsive PHP file on the fly. There are lots of files which can hold code to send out mails. Problem is, the new webserver uses a mailserver that demands SMTPAuth to accept mails for sending. The code doesn't provide any SMTPAuth credentials because the former hosting didn't use it.
The scripts are using PHPMailer. My question is if there is any way to centrally set SMTPAuth credentials (host, username, password) which will be used by PHPMailer automatically always while sending out mails?
I do not want to touch the foreign code and alter each script so it uses SMTPAuth like:
$mail->IsSMTP = true; $mail->Host = "blah"; $mail->Username = "xxx";
and so on. I hope my intention is clear. Please ask if there are questions.