What I am trying to achieve is if php is sending a mail then it should ignore the $to address and mail them all to one address that we can put in a common place.
I like to test all the mails in localhost, and I have set up php and sendmail settings with my gmail to send all the emails, but the problem is, I might accidentally send a mail to a real person who shouldn't have been receiving that email at that time.
So is there a way I can send/redirect the mail to say "xyz@gmail.com" instead of $to address that i would get through a database without changing the code every time i might want to test a block of code.
I have searched for a solution but couldn't find any.
source https://stackoverflow.com/questions/76497290/set-up-sendmail-in-xampp-in-a-way-that-all-the-mails-sent-from-localhost-are-sen
No comments:
Post a Comment