Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emails could not be sent. htmlentities() expects parameter 1 to be string, array given in xxx #143

Open
xrobrobx opened this issue May 12, 2018 · 8 comments

Comments

@xrobrobx
Copy link

Debug Messages
Preparing request data
Request headers: Array( [User-Agent] => wordpress-sparkpost/3.2.0 [Content-Type] => application/json [Authorization] => xxxx************************************)
Request body: {"recipients":[{"address":{"email":"[email protected]","header_to":"[email protected]"}}],"options":{"open_tracking":true,"click_tracking":true,"transactional":true},"content":{"template_id":"general"},"substitution_data":{"content":"

Hurray!!</h3>

You've got mail! <br/>
Regards,<br/><a href="https://www.sparkpost.com">SparkPost</a> WordPress plugin</p>","subject":"SparkPost email test","from_name":"My Name","from":"[email protected]","from_localpart":"support"}}
Making HTTP POST request to https://api.sparkpost.com/api/v1/transmissions
Response received
Request completed with error

Warning: htmlentities() expects parameter 1 to be string, array given in /home/xxx/public_html/xxx.com/wp-includes/class-phpmailer.php on line 732

I've been getting this when sending any test emails and any emails sent through SparkPost as of Mar 11, 12AM.

Nothing was changed and I am wondering could be causing this issue?

@rajumsys
Copy link
Contributor

Can you please report this

  • WordPress version
  • phpMailer version
  • SparkPost plugin version

are you getting this all of a sudden (i mean were it working earlier but not getting this) or you're getting it since installation.

@xrobrobx
Copy link
Author

WordPress version -> 4.9.5
phpMailer version -> 5.2.22
SparkPost plugin version -> 3.2.0

It appears to be working again now. I am not sure why it suddenly jumped back and forth between working or not as nothing was done to modify the ways the emails are sent.

@rajumsys
Copy link
Contributor

Did you enable/disable any other plugins/themes in between?

@xrobrobx
Copy link
Author

I only switched between HTTP API and SMTP. SMTP seems to be fine but no templates can be used, but switching over to the HTTP API always gave me that error.

Last night it started working again after giving that error for 1-2 days.

@xrobrobx
Copy link
Author

Okay, it worked for a day or two and does the same thing, nothing was changed.

I think SparkPost is changing something on their end? I'm not certain why it is works intermittently for a day or two before doing the thing, same error.

@xrobrobx xrobrobx reopened this May 16, 2018
@rajumsys
Copy link
Contributor

Did you enable email logging? can you inspect the request and response sections to see any differences in either one?

@xrobrobx
Copy link
Author

How do I enable email logging? I only see the debug checkbox for the error messages

@rajumsys
Copy link
Contributor

From overrides tab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants