Sign inSign up

nhea/mailservice

By nhea

•Updated about 4 years ago

Nhea mailing service.

Image
0

2.0K

nhea/mailservice repository overview

Click here⁠ to visit repository github page.

⁠Pulling

docker pull nhea/mailservice:latest

⁠Usage

⁠Parameters
-e MAILQUEUE_CONNECTION: SQL connection string which contains nhea_MailQueue table.
-e MAILQUEUE_SMTPSETTINGS: SMTP inline configurations. By default should be json.
-e MAILQUEUE_SMTPSETTINGS_FILE: SMTP configurations by file path. By default should be json.
-e MAILQUEUE_DATAFORMAT: xml or json. Default value is json.
-e MAILQUEUE_IGNORE_SSL_VALIDATION: true of false. Ignores ServerCertificateValidationCallback errors when true. Default value is false.

Either MAILQUEUE_SMTPSETTINGS or MAILQUEUE_SMTPSETTINGS_FILE must be provided.


⁠Docker run sample

docker run --rm -it --restart unless-stopped -t nhea/mailservice:latest\
-e MAILQUEUE_CONNECTION='sqlconnectionstring'\
-e MAILQUEUE_SMTPSETTINGS='[{"From": "[email protected]", "Host": "smtp.gmail.com", "UserName": "[email protected]", "Password": "mailpassword", "Port": 587, "EnableSsl": true, "IsDefault": true, "DefaultToRecipients":"[email protected]", "DefaultSubject":"Default Subject", "Sender":"Sender Name", "AutoGeneratePlainText":false, "DisableHistoryLogging":false }]'

Smtp settings is an array and you can add more than one configuration.

  • 'From' field must be unique in this array.
  • Set 'IsDefault' to true for only one smtp element. This entity will be used for records with empty 'from' data.

⁠Docker compose sample

services:
  nhea.mailservice:
    image: nhea/mailservice
    restart: unless-stopped
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ASPNETCORE_URLS=https://+:443;http://+:80
      - 'MAILQUEUE_CONNECTION=sqlconnection'
      - 'MAILQUEUE_SMTPSETTINGS=[{"From": "[email protected]", "Host": "smtp.gmail.com", "UserName": "[email protected]", "Password": "mailpassword", "Port": 587, "EnableSsl": true, "IsDefault": true, "DefaultToRecipients":"[email protected]", "DefaultSubject":"Default Subject", "Sender":"Sender Name", "AutoGeneratePlainText":false, "DisableHistoryLogging":false }]'
      - MAILQUEUE_IGNORE_SSL_VALIDATION=true

⁠SMTP Library

By default nhea mail service sends mails via .Net Core SmtpClient. At the moment you can also use MailKit as SmtpClient too. In order to use MailKit just set 'SmtpLibrary' setting on the mail settings individually you would like to.

- 'MAILQUEUE_SMTPSETTINGS=[{"From": "[email protected]", "SmtpLibrary": "mailkit", "Host": "smtp.gmail.com", "UserName": "[email protected]", "Password": "mailpassword", "Port": 587, "EnableSsl": true, "IsDefault": true, "DefaultToRecipients":"[email protected]", "DefaultSubject":"Default Subject", "Sender":"Sender Name", "AutoGeneratePlainText":false, "DisableHistoryLogging":false }]'

Tag summary

Content type

Image

Digest

sha256:435773310…

Size

84.6 MB

Last updated

about 4 years ago

docker pull nhea/mailservice