Closed kees-closed closed 5 years ago
Do you have an environment folder such as user/localhost/config? This would override the user/config Is so just delete the email plug-in config in there: /user/localhost/config/plugins/email.yaml
I never heard of such an environment folder, I also checked if it was created by some other process, but non found with find . -iname "*localhost*" -type d
inside the Grav root folder.
If nothing exists to reset a plugin then I'll just have to reinstall Grav and see if that works. Because at the moment the email plugin is unstable. When I save the settings inside the email plugin web interface, then it works for ~1 hour. After that something cancels out the working configuration and the email functionality fails.
I just reinstalled everything, only the pages were copied back into user/pages. The problem persists, so I guess it's a problem with my own code.
What I would like to know, how can I troubleshoot this better? This is what I've tried.
tcpdump
on port 25 of the sending host, nothing is happening when sending the emailjournalctl -f
on both the web and mail server don't reveal any activitysudo -u www-data php bin/plugin email test-email -t admin@example.com
works fineWhat is your email plugin config?
enabled: true
from: info@example.com
from_name: 'Admin'
to: info@example.com
to_name: 'Admin'
mailer:
engine: sendmail
smtp:
server: example.home.lan
port: 25
encryption: none
sendmail:
bin: '/usr/sbin/sendmail -bs'
content_type: text/html
debug: true
It's probably cache related, disabled cache for an hour now and it still works fine. If this is the case then I still can't pinpoint the cause, but at least I've found a working solution for the time being. It could be something that was introduced with the latest upgrade of Grav (1.5.3).
Sounds like its now sorted.
The contents of the file user/plugins/email/email.yml are different than the settings displayed in the web dashboard. I tried clearing the case, changing settings in both the file and dashboard, hoping it would trigger a resync. But it didn't. Is there a way to reset a plugin to its default state without reinstalling it? The email plugin depends on may other plugins, which would be reinstalled then as well, which would come down to re-configuring a part of Grav (not looking forward to that).