getgrav / grav-plugin-email

Grav Email Plugin
http://getgrav.org
MIT License
37 stars 29 forks source link

Can't change/save SMTP configuration #164

Closed zachmonkey closed 2 years ago

zachmonkey commented 2 years ago

Not possible to change

SMTP server SMTP port SMTP login name SMTP password SMTP auth mode

via admin interface admin/plugins/email

UI says "saved successfully" but changes are not kept. When leaving the page after saving this pop-up appears.

image

rhukster commented 2 years ago

I can't replicate this with a vanilla installation (grav + admin + form + login + email). I suspect its a plugin that is causing this. What plugins do you have installed?

zachmonkey commented 2 years ago

@rhukster

image

Ceevee theme - site installed via Ceevee skeleton

rhukster commented 2 years ago
CleanShot 2022-06-16 at 22 54 55@2x

Still no issues for me.

Can you save other pages/plugins etc?

zachmonkey commented 2 years ago

Yep, this is the only plugin that refuses to save changes in this installation. I checked the raw yaml file out of frustration and the weird thing is if I change the settings in there, those new settings aren't reflected in the admin UI. File permissions are 644

rhukster commented 2 years ago

can you provide the yaml config file so i can check for anomalies?

zachmonkey commented 2 years ago

Sure, see below. But the problem occurred before any direct alterations of the yaml file. I was able to save a config change once using the UI, then any subsequent changes were met with "saved successfully" followed by the warning popup "changes not saved" upon leaving the page. At this point I went for the yaml file. So this file shouldn't be the problem, despite its perhaps diabolical current state. Changed the values to "xx".

enabled: true
from: 'xx'
from_name: 'xx'
to: 'xx'
to_name: 'xx'
queue:
  enabled: false
  flush_frequency: '* * * * *'
  flush_msg_limit: 10
  flush_time_limit: 100
mailer:
  engine: 
  smtp:
    server: 'smtp.gmail.com'
    port: '587'
    encryption: 'TLS'
    user: 'xx'
    password: 'xx'
#    auth_mode: ''
#  sendmail:
#   bin: '/usr/sbin/sendmail -bs'
content_type: text/html
debug: false

Also note that the values saved in the file aren't reflected in the UI. UI shows this:

image

rhukster commented 2 years ago

Do you have any environment-based configurations? You might be saving to a different location, eg user/localhost/config/plugins/email.yaml

zachmonkey commented 2 years ago

We've made no custom configurations whatsoever. Thing is installed out of the box, using the ceevee skeleton. Problem occurred upon the 2nd time changing the email plugin settings. Host is Hostinger, Litespeed server. "Problems plugin" shows no problems. Really feels like a bug, since the first save went through, but the second one and any subsequent ones didn't.

Update: wild thought... I'm just thinking whether actually passing requests through the form plugin somehow screwed this up. We were testing out the contact form on the site while the email config was faulty. Wonder if this somehow affected this. That's the only thing I can imagine happening between the first save of config to the second save...

rhukster commented 2 years ago

It might be an issue with litespeed server. We've not had any issues reported regarding this before. I still can't replicate your issue, so just trying to work out what's unique to you. I'll see if i can test litespeed today.

rhukster commented 2 years ago

Nope, just fired up a new Linode and setup Litespeed via RunCloud and things just work fine. No problem editing and saving the email config via the admin.

zachmonkey commented 2 years ago

All of a sudden it just started working... No changes by us, just time passing. I guess it could be an environment problem...