[buddypress-trac] [BuddyPress Trac] #8159: bp_send_email not sending emails to all if passing multiple email ids since 4.0.0 update
buddypress-trac
noreply at wordpress.org
Thu Nov 7 12:07:08 UTC 2019
#8159: bp_send_email not sending emails to all if passing multiple email ids since
4.0.0 update
--------------------------+-----------------------------
Reporter: alexhal | Owner: DJPaul
Type: defect (bug) | Status: assigned
Priority: high | Milestone: Awaiting Review
Component: Emails | Version: 5.0.0
Severity: major | Keywords:
--------------------------+-----------------------------
Hi we are using bp_send_email to send email to single and multiple users.
We are sending array of email :
`
$emails = [
'abc at g.com',
'efg at g.com',
'hij at g.com'
]
$email_type = 'custom';
$bpargs = array(
'tokens' => array('post.name'=>'customtoken')
);
bp_send_email( $email_type,$emails, $bpargs );`
So after execution it is only sending email to first email in array :
abc at g.com
It use to send email to all emails in that array previously .
however running a loop and sending email to one user at a time is working
:
`
$emails = [
'abc at g.com',
'efg at g.com',
'hij at g.com'
]
$email_type = 'custom';
$bpargs = array(
'tokens' => array('post.name'=>'customtoken')
);
foreach($emails as $email){
bp_send_email( $email_type,$email, $bpargs );
}
`
Please tell us what exactly is wrong with this ?
Does bp_send_email function does not supports sending email to multiple
email in one go.We really want to avoid the for loop .
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8159>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list