![]() The above request returns true because wp_mail returns true (as it does when an email is sent successfully), and I receive the email. $result = wp_mail( "Test subject", "Test message", array( "From: MySite ") Register_rest_route( "mynamespace/v1", "/send-email", [ via an API request, I do receive the email: // This is the custom API route that sends the email Now if I try to send an email with wp_mail (which internally uses a PHPMailer instance configured as above) from my Wordpress code, eg. I've configured Wordpress like this: add_action( "phpmailer_init", array( $this, "configure_mailer" ) ) (By the way, I don't think the problem has to do with Wordpress, which is why I'm posting here rather than Wordpress Stack Exchange). I have a local Wordpress website that sends emails successfully, however if I try to send an email from a Codeception integration test, I do not receive any emails. Message: simplexml_load_string(): Entity: line 1: parser error : XML declaration allowed only at the start of the document ![]() It shows some error A PHP Error was encountered This is the php code i used to parse soap response $obj = simplexml_load_string(read_file('./soap.xml')) I parsed html content as soap response but i can't retrieve it in client
0 Comments
Leave a Reply. |