def email_store(self): return AzureEmailStore( email_storage=get_email_storage(), mailbox_storage=get_mailbox_storage(), pending_storage=get_pending_storage(), send_email=send_and_index_email, )
def send(resource_id: str) -> None: action = SendOutboundEmails( email_storage=get_email_storage(), send_email=get_email_sender(), ) action(resource_id)
def written_store(resource_id: str) -> None: action = StoreWrittenClientEmails( client_storage=get_client_storage(), email_storage=get_email_storage(), next_task=send.delay) action(resource_id)
def send(resource_id: str) -> None: action = SendOutboundEmails( email_storage=get_email_storage(), send_email=SendSendgridEmail(key=config.SENDGRID_KEY), ) action(resource_id)
def inbound_store(resource_id: str) -> None: action = StoreInboundEmails( raw_email_storage=get_raw_email_storage(), email_storage=get_email_storage(), pending_factory=get_pending_storage) action(resource_id)
def index_sent_email_for_mailbox(resource_id: str) -> None: action = IndexSentEmailForMailbox( email_storage=get_email_storage(), mailbox_storage=get_mailbox_storage(), ) action(resource_id)
def index_received_email_for_mailbox(resource_id: str) -> None: action = IndexReceivedEmailForMailbox( email_storage=get_email_storage(), mailbox_storage=get_mailbox_storage(), ) action(resource_id)
def written_store(resource_id: str) -> None: action = StoreWrittenClientEmails( client_storage=get_client_storage(), email_storage=get_email_storage(), user_storage=get_user_storage(), next_task=send_and_index_email, ) action(resource_id)
def inbound_store(resource_id: str) -> None: action = StoreInboundEmails( raw_email_storage=get_raw_email_storage(), email_storage=get_email_storage(), pending_storage=get_pending_storage(), next_task=index_received_email_for_mailbox.delay, ) action(resource_id)
def process_service_email(resource_id: str) -> None: action = ProcessServiceEmail( raw_email_storage=get_raw_email_storage(), email_storage=get_email_storage(), registry=REGISTRY, next_task=send_and_index_email, ) action(resource_id)
email_receive = ReceiveInboundEmail( auth=get_auth(), raw_email_storage=get_raw_email_storage(), next_task=inbound_store.delay, ) client_write = UploadClientEmails( auth=get_auth(), next_task=written_store.delay, ) client_read = DownloadClientEmails( auth=get_auth(), client_storage=get_client_storage(), email_storage=get_email_storage(), pending_factory=get_pending_storage, ) client_register = RegisterClient( auth=get_auth(), client_storage=get_client_storage(), setup_mailbox=get_mailbox_setup(), setup_mx_records=get_mx_setup(), ) metrics_pending = CalculatePendingEmailsMetric( auth=get_auth(), pending_factory=get_pending_storage, )