getgrav / grav-plugin-email

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

Critical error during the rendering of a template via Grav Admin Plugin #82

Closed justinhartman closed 2 years ago

justinhartman commented 6 years ago

Hi Guys,

See some basic setup information below:

admin-plugins

I was trying to access the Email plugin (v2.7.1) settings via the Admin Panel v1.6.7 but when clicking on the Email link /admin/plugins/email I got to see this wonderful screen:

admin-error

I've dumpped the error log file for you guys and this is from the point of breaking. I'm not really sure why there's an array when trying to load a template but I hope that the info you have allows you to debug this properly.

My environment settings are as follows:

rhukster commented 6 years ago

What does your user/config/plugins/email.yaml look like?

justinhartman commented 6 years ago

I've changed the email addresses in the yaml file below and removed my access details to sendgrid but the rest is as per my email.yaml file.

enabled: true
from: enquiries@email.com
to:
  -
    mail: enquiries@email.com
    name: Website Enquiries
  -
    mail: email@gmail.com
    name: Justin Hartman
mailer:
  engine: smtp
  smtp:
    server: smtp.sendgrid.net
    port: 587
    encryption: tls
    user: 'OMMITTED'
    password: 'OMMITTED'
  sendmail:
    bin: '/usr/sbin/sendmail'
justinhartman commented 6 years ago

OK, it loads perfectly when I remove one of my two to email addresses like so:

enabled: true
from: enquiries@email.com
to:
    mail: enquiries@email.com
    name: Website Enquiries
mailer:
  engine: smtp
  smtp:
    server: smtp.sendgrid.net
    port: 587
    encryption: tls
    user: 'OMMITTED'
    password: 'OMMITTED'
  sendmail:
    bin: '/usr/sbin/sendmail'

Does this mean that instead of having two email addresses in the to field I should use one in the to and the other in the cc field? Is it not able to accept two emails in the to field?

rhukster commented 6 years ago

It should work with multiple to's, but there might be an issue with that mail/name format.

rhukster commented 6 years ago

I will investigate when i get a chance. Thanks.