---
name: "Debbugs::Recipients"
section: "3pm"
platform: "linux"
package: "libdebbugs-perl"
version: "2.6.4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Debbugs::Recipients"
---

# Debbugs::Recipients(3pm)

## NAME

Debbugs::Recipients -- Determine recipients of messages from the bts

## SYNOPSIS

## DESCRIPTION

## BUGS

None known.

### add\_recipients

```
     add_recipients(data => $data,
                    recipients => \%recipients;
                   );
```

Given data (from read\_bug or similar) (or an arrayref of data), calculates the addresses which need to receive mail involving this bug.

- data -- Data from read\_bug or similar; can be an arrayref of data

  - recipients -- hashref of recipient data structure; pass to subsequent calls of add\_recipients or

  - debug -- optional

  ### determine\_recipients

```
     my @recipients = determine_recipients(recipients => \%recipients,
                                           bcc => 1,
                                          );
     my %recipients => determine_recipients(recipients => \%recipients,);
     # or a crazy example:
     send_mail_message(message => $message,
                       recipients =>
                        [make_list(
                          values %{{determine_recipients(
                                recipients => \%recipients)
                                  }})
                        ],
                      );
```

Using the recipient hashref, determines the set of recipients.

If you specify one of `"bcc"`, `"cc"`, or `"to"`, you will receive only a LIST of recipients which the main should be Bcc'ed, Cc'ed, or To'ed respectively. By default, a LIST with keys bcc, cc, and to is returned with ARRAYREF values corresponding to the users to whom a message should be sent.

- address\_only -- whether to only return mail addresses without reasons or realnamesq

  Passing more than one of bcc, cc or to is a fatal error.

## PRIVATE FUNCTIONS

### \_add\_address

```
          _add_address(recipients => $param{recipients},
                       address => $addmaint,
                       reason => $param{data}{package},
                       bug_num => $param{data}{bug_num},
                       type  => 'cc',
                      );
```
