Closed plexmaniax closed 2 months ago
Hi @plexmaniax. I am curious as to what part you found was "very hard" to get the right config?
Whilst I totally understand your request, I cannot even begin to consider implementing any custom relay API integrations in Mailpit as there are literally hundreds of different APIs used to send email via different services, and each service works differently. Say for example I added integration with Brevo, the next user would want integration with AWS SES, the next with Sendgrid... Mailgun... Mailchannels etc. I would end up having to both create and maintain so many custom APIs, when in actual fact they all support the default email standard: SMTP.
Hi @axllent
Only the systemd Part was very hard ;) I struggeld by adding all the ens. My solution was to reorder them, as shown above.
You're right by adding brevo you open pandoras box. I think a was a little bit frustrated about the task and wanted a handy solution. Please close that issue.
Thanks for your reply and your hard work
Greetings from Switzerland
I understand. Do you realise that you could also just provide a config file for the SMTP details instead of setting them all via the environment? You would just need to modify your ExecStart=/home/www-data/bin/mailpit --smtp-relay-config <path-to-config>
?
Today I configured a testserver with mailpit as systemd service. For the releasing feature I added the smtp details from BREVO.
[Unit] Description=Mailpit After=network.target
[Service] Type=simple Restart=always RestartSec=30
Environment=MP_DATABASE=/home/www-data/bin/mailpit.db Environment=MP_LOG_FILE=/home/www-data/bin/mailpit.log Environment=MP_UI_AUTH=USER:PASS
Environment=MP_SMTP_RELAY_HOST=smtp-relay.brevo.com Environment=MP_SMTP_RELAY_PORT=587 Environment=MP_SMTP_RELAY_STARTTLS=true Environment=MP_SMTP_RELAY_AUTH=login Environment=MP_SMTP_RELAY_USERNAME=mailaddress Environment=MP_SMTP_RELAY_PASSWORD="PASSWORD"
ExecStart=/home/www-data/bin/mailpit
[Install] WantedBy=default.target
It was very hard to get the right config, so I think it would be much easier to use the Brevo API instead.
https://developers.brevo.com/docs/getting-started
Maybe you could think about and give me some response?
Best Regards Maik