11 Connection(int fd_in
, int fd_out
, std::function
<void(void)> read_hook
)
15 std::chrono::minutes(2),
16 std::chrono::minutes(2))
22 std::string server_id
;
24 std::string ehlo_keyword
;
25 std::vector
<std::string
> ehlo_param
;
26 std::unordered_map
<std::string
, std::vector
<std::string
>> ehlo_params
;
28 std::string reply_code
;
30 bool greeting_ok
{false};
32 bool active
{false}; // At least one rcp_to for this MX
34 bool has_extension(char const* name
) const
36 return ehlo_params
.find(name
) != ehlo_params
.end();
43 Send(fs::path config_path
, char const* service
);
45 void set_sender(Domain sender
) { sender_
= sender
; }
47 bool mail_from_rcpt_to(DNS::Resolver
& res
,
50 std::string
& error_msg
);
52 bool send(std::string_view msg
);
58 fs::path config_path_
;
63 std::unique_ptr
<SMTP::Connection
> conn_
;
66 #endif // SEND_DOT_HPP