0

have hundreds of php files which initiates mails throw SMTP server using "mail()" function. Now the this SMTP is shutting down in few-days and we are asked to contact external EmailWebService to send mails. I have written code to contact EmailWebService but here my problem starts,I have to search each file and substitute each "mail()" function call with my new function.

So i want to override the "mail()" function so that it invoke my function which can contact EmailWebService. To get this functionality i have installed APD ,it seems installed successfully but when i am try to use the function i am getting "Call to undefined function apd_set_pprof_trace()" error.

Could you please any one help me how get out of this issue within time or suggest different solution which avoid manual work of search and replace

Siva Kumar
  • 171
  • 1
  • 3

1 Answers1

0

If you have hundreds of files that call mail() with a specific hostname, which will not be available soon, you could either:

  1. Manually search and replace just that hostname,
  2. Put that hostname in your HOSTS file as 127.0.0.1 & set up an MTA on that will relay all mail to your new host.
Mark R.
  • 363
  • 1
  • 5