Comments (7)
@bilalmalkoc having the same issue, did you manage to figure out a solution to this?
from wp_mail.
@zkingdesign no i can't
from wp_mail.
@bilalmalkoc , what I did is that I've put the code into a foreach, and looped through it.
foreach ($emails as $email) {
$item = WP_Mail::init()
->headers("<". get_option('admin_email') .">")
->to($email)
->subject('Update')
->send();
}
from wp_mail.
@zkingdesign it can gives timeout error when you try for 1000+ emails.
from wp_mail.
@bilalmalkoc from what you have described there is no actual issue with the code. In fact it's working just how it should. If you want to send the same email to multiple people, but hide who you sent that to, you have to use BCC (Blind Carbon Copy) not To or CC (Carbon Copy). That way each recipient get their own copy of the email. Also if you are trying to send to 1000+ people at once you should probably be doing that in a cron or queued job outside of WP. That way you avoid your web server (Apache/Nginx etc) Timing out the request.
@anthonybudd This is not a bug and should be closed.
from wp_mail.
Hello,
Trying to pass an Array to the TO field, I'm getting two PHP warnings:
PHP Warning: preg_match() expects parameter 2 to be string, array given in /wp-includes/pluggable.php on line 385
[20-Mar-2020 21:55:51 UTC] PHP Warning: trim() expects parameter 1 to be string, array given in /wp-includes/class-phpmailer.php on line 873
Is anyone else getting this issue?
from wp_mail.
Hey folks, found the issue.... here:
return wp_mail($this->to, $this->buildSubject(), $this->render(), $this->buildHeaders(), $this->attachments);
this should be:
return wp_mail($this->to[0], $this->buildSubject(), $this->render(), $this->buildHeaders(), $this->attachments);
Seems like some code is creating a multi-dimensional array... I guess?
from wp_mail.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp_mail.