#include "handler.ih"

void Handler::mailZip() const
{
    if (not g_options.sendMail())
        return;

    auto const &mailZipAddresses = g_options.mailZipAddresses();

    if (mailZipAddresses.empty())
        return;

    g_mailer.setTo(mailZipAddresses);
    g_mailer.noCC();
    g_mailer.attach(d_zip);
    g_mailer.sendmail("Cpp zip from " + d_from, "zip-file is attached");
}
