Exemple #1
0
 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,
     )
Exemple #2
0
def send(resource_id: str) -> None:
    action = SendOutboundEmails(
        email_storage=get_email_storage(),
        send_email=get_email_sender(),
    )

    action(resource_id)
Exemple #3
0
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)
Exemple #4
0
def send(resource_id: str) -> None:
    action = SendOutboundEmails(
        email_storage=get_email_storage(),
        send_email=SendSendgridEmail(key=config.SENDGRID_KEY),
    )

    action(resource_id)
Exemple #5
0
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)
Exemple #6
0
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)
Exemple #7
0
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)
Exemple #8
0
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)
Exemple #9
0
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)
Exemple #10
0
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)
Exemple #11
0
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,
)