Ejemplo n.º 1
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)
Ejemplo n.º 2
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)
Ejemplo n.º 3
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)
Ejemplo n.º 4
0
from opwen_email_server.actions import RegisterClient
from opwen_email_server.actions import UploadClientEmails
from opwen_email_server.integration.azure import get_auth
from opwen_email_server.integration.azure import get_client_storage
from opwen_email_server.integration.azure import get_email_storage
from opwen_email_server.integration.azure import get_mailbox_setup
from opwen_email_server.integration.azure import get_mx_setup
from opwen_email_server.integration.azure import get_pending_storage
from opwen_email_server.integration.azure import get_raw_email_storage
from opwen_email_server.integration.celery import inbound_store
from opwen_email_server.integration.celery import written_store
from opwen_email_server.services.auth import BasicAuth

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,
)