summaryrefslogtreecommitdiff
path: root/src/file/mail.hpp
blob: 34050bf1c44370ebdf113f61d48ecc0b34e25799 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include <string>
#include <optional>

#include "managment/general.hpp"

namespace smtp::file
{
    class Mail
    {
    public:
        explicit Mail( std::string const& path_file );
        ~Mail() = default;

        manage::MailsSet Read() const;
        bool Write( manage::MailsSet const& data ) const;
    private:
        std::optional<std::string> GetMailFromLine( std::string const& line ) const;

        std::string mPathFile;
    };

}