You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be a way to get all recipients before calling send(). For example, if we call:
$recipients = $phpmailer->getToAddresses();
This list might be empty if the addresses were added to $phpmailer->RecipientsQueue instead of $phpmailer->to
All of the get*Addresses methods should include the RecipientsQueue, or we should have a second method to return all recipients, including those that are in the queue. Maybe something like this:
public function getAllToAddresses(){
return $this->getOrDequeueAddresses('to');
}
public function getAllCcAddresses(){
return $this->getOrDequeueAddresses('cc');
}
public function getAllBccAddresses(){
return $this->getOrDequeueAddresses('bcc');
}
protected getOrDequeueAddresses($kind){
return array_merge( $this->{$kind}, array_filter(
$this->RecipientsQueue,
static function ($params) use ($kind) {
return $params[0] == $kind;
}
));
}
The text was updated successfully, but these errors were encountered:
There should be a way to get all recipients before calling send(). For example, if we call:
This list might be empty if the addresses were added to
$phpmailer->RecipientsQueue
instead of$phpmailer->to
All of the get*Addresses methods should include the RecipientsQueue, or we should have a second method to return all recipients, including those that are in the queue. Maybe something like this:
The text was updated successfully, but these errors were encountered: