#pragma once
#include <filesystem>
#include "email_sender.h"
/// Development sender that atomically publishes the latest link to a file.
class FileEmailSender final : public EmailSenderInterface
{
public:
/// Store the absolute target whose existing parent receives temp files.
explicit FileEmailSender(std::filesystem::path link_file);
/// Atomically write the latest absolute confirmation URL.
mw::E<void> send(const AuthenticationEmail& email) override;
/// File delivery does not consume the Mailjet quota.
bool usesGlobalQuota() const override;
private:
std::filesystem::path link_file_;
};