Monica: [Docker] cannot receive reminder emails via mailgun

Created on 20 Mar 2018  路  5Comments  路  Source: monicahq/monica

Related to #580 and #860, I'm having difficulty setting up monica with mailgun. I've deployed v1.8.1 via Docker and am using the provided (filled out) .env, plus the following:

MAIL_DRIVER=mailgun
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=postmaster@<mydomain.com>
MAIL_PASSWORD=<password>
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=<[email protected]>
MAIL_FROM_NAME="Tom Vincent"
APP_EMAIL_NEW_USERS_NOTIFICATION=<[email protected]>
MAILGUN_DOMAIN=<mydomain.com>
MAILGUN_SECRET=key-<mailgun key>

Per #860, I've created new reminder for today and run:

docker-compose run monicahq shell
php artisan send:reminders
# or
php artisan send:notifications

... but don't receive anything nor see anything in the the docker logs or in mailgun. I'm not seeing any change if I set APP_ENV=local and APP_DEBUG=true. However, I am able to send via curl/mailgun api.

How else can I debug this?

Most helpful comment

So basically, for once, it's not a bug, it's a feature 馃榾

All 5 comments

Reminders are sent the hour it is defined under Settings

image

So if you want to send a reminder, but you are not in the correct timeframe the email is supposed to be sent, nothing will be sent.

Example:

  • You create a reminder to be sent on March 30.
  • Your settings indicate that you want to send reminder emails at 4pm
  • On the March 30th, your instance will start sending those reminders only after 4:00pm, not midnight or when you do php artisan send:notifications.

So basically, for once, it's not a bug, it's a feature 馃榾

Can confirm; created a new notification and set sending schedule to the next hour and received it fine. Can only suggest adding a debug artisan command/flag to support testing this. Thanks!

I would also would vote for an opportunity to test mail sending with detailed logging, as i am still unable to get the reminders up and running.

What i miss is some logging about what's going on. if i execute php artisan send:notifications. i also tried to set APP_DEBUG=true but the server logs remain empty regarding sending mail attempts.

I am also struggeling with this now. With setup as Heroku, mailgun.
I followed this issue for setting up mailgun, but I cant seem to get it to work.
https://github.com/monicahq/monica/issues/1776

Using the proper secrets and everything

Was this page helpful?
0 / 5 - 0 ratings

Related issues

baisong picture baisong  路  3Comments

jkbecker picture jkbecker  路  3Comments

jbiswas picture jbiswas  路  3Comments

cynddl picture cynddl  路  3Comments

asbiin picture asbiin  路  4Comments