#include "handler.ih"

void Handler::setCCs()
{
    if (d_pdf2from)                         // no CCs when the pdf is only
        return;                             // written for d_from

    if (not d_raterEmail.empty())            // rater was specified:
        g_mailer.setCC(d_raterEmail, "");    // CC the rater
    else
    {                                       // no rater was specified:
        string addresses;                   // each rated receives a cc
        for (auto const &value: d_ccInfo)
            addresses += value.second.second + ' ';

        g_mailer.setCC(addresses, g_options.ccAddresses());
    }
}
