Closed Tsjippy closed 2 years ago
Hey @Tsjippy. I've tested your code and it works well. I was not able to replicate the issue with the REST API.
Maybe it's a plugin conflict. Can you verify that you don't have other mailing/SMTP plugins activated? Also, can you provide more details like the WP version, PHP version, and active plugins (with versions), please?
I finally figured what was wrong: removing the '/' from 'sim/v1/' fixed the problem
Expected Behavior
Mails should always be send by smtp mail
Current Behavior
Smtp mail works only on the normal webpages, not in REST API functions.
If I go to the page with shortcode “test” I receive an e-mail from the correct e-mail adress If I go to the rest api page i.e. https://SOMETHING.org/wp-json/sim/v1/sendtestemail I get the e-mail from wordpress@SOMETHING.org
See this code:
Possible Solution
Steps to Reproduce
See above. Use the code given