Woo commerce orders mails are not coming in inbox, error message- could not instantiate mail function

Solution:1

used pepipost plugin to bypass phpmailer function now mail is sent usinng SMTP. first of all, need to create an account on pepipost and verify your domain then an API key will generate paste that API key in your pepipost wordpress plugin

Solution:2

One more tip I will add here. Make sure to use the server’s IP address where your website is pointing as SMTP hostname .

Because email from website (that is contact form) are used to run from the server where your website is pointing.