Sign inSign up

miaplaza/middlemail

By miaplaza

•Updated over 1 year ago

Transactional Email

Image
0

10K+

miaplaza/middlemail repository overview

⁠MiddleMail Build

MiddleMail is an email sending middleware: It offers an API for transaction email delivery and activity logging and acts as a middleware for other delivery services. Because all parts of MiddleMail are pluggable it can be used in different configurations for both production and staging applications: E.g. you can turn off actual delivery for a staging deployment but leave activity logging enabled to view recent email activity.

⁠Projects

ProjectPackageDescription
MiddleMailNuGetCore library and abstractions
MiddleMail.ModelNuGetMessage model shared by most other projects
MiddleMail.ServerDockerReady to use server application
MiddleMail.Client.RabbitMQNuGetClient library that uses RabbitMQ as a backend
MiddleMail.MessageSource.RabbitMQ-MessageSource implementation that uses RabbitMQ as a backend
MiddleMail.Delivery.Smtp-Delivery implementation via SMTP
MiddleMail.Storage.Memory-Activity storage in-memory
MiddleMail.Storage.ElasticSearch-Activity storage in ElasticSearch

⁠Concepts

The three most important concepts in MiddleMail are MessageSource, Storage and Delivery.

A MiddleMail.IMessageSource defines how MiddleMail consumes emails. Those emails then enter the processing pipeline.

To persist information about email activity MiddleMail uses a MiddleMail.IStorage. Depending on the implementation this makes email activity easily searchable and debuggable.

For actual delivery an MiddleMail.IMailDeliverer is used: MiddleMail.Delivery.Smtp implements such a deliverer for SMTP but it is easy to plugin your prefered Email Delivery SaaS or disable delivery for debugging and testing.

⁠Configuration

The following table lists the configurable parameters for MiddleMail. To pass them as environment variables on bash replace : with __.

ParameterDescription
MiddleMail:Delivery:Smtp:ServerHostname of the upstream SMTP server
MiddleMail:Delivery:Smtp:Port.Port of the SMTP server
MiddleMail:Delivery:Smtp:UsernameUsername for the SMTP connection
MiddleMail:Delivery:Smtp:PasswordPassword for the SMTP connection
MiddleMail:Delivery:MimeMessage:MessageIdDomainPartDomain part of the message id as in <[email protected]> used to construct the message id of a mime message.
MiddleMail:ExponentialBackoff:Multiplicatordelay = 2^iteration * multiplicator seconds delay after processing failure.
MiddleMail:Storage:ElasticSearch:UriURI of the Elasticsearch instance
MiddleMail:Storage:ElasticSearch:Indexname of the Elasticsearch index we write messages to
MiddleMail:MessageSource:RabbitMQ:ConnectionStringConnectionstring to rabbitmq, as defined at https://github.com/EasyNetQ/EasyNetQ/wiki/Connecting-to-RabbitMQ⁠. E.g. host=localhost;prefetchcount=10
MiddleMail:MessageSource:RabbitMQ:SubscriptionIdUnique subscription id for this instance of middle mail
REDIS_CONFIGURATIONConfiguration used to connect to Redis, as defined at https://stackexchange.github.io/StackExchange.Redis/Configuration⁠
REDIS_INSTANCE_NAMEThe Redis instance name
DISABLE_SMTPDo not actually send anything via SMTP.

⁠Tools

ProjectDescription
EmailMessageGeneratorGenerates test email messages

Tag summary

Content type

Image

Digest

sha256:0e6ac99d5…

Size

89.5 MB

Last updated

over 1 year ago

docker pull miaplaza/middlemail