Giter Site home page Giter Site logo

Comments (6)

rhukster avatar rhukster commented on July 24, 2024

What does your email config look like (please
redact sensitive information).

Also can you provide an example form or scenario that exhibits this issue so I can try to recreate it. ?

from grav-plugin-email.

hughbris avatar hughbris commented on July 24, 2024

Thank you.

Also can you provide an example form or scenario that exhibits this issue so I can try to recreate it. ?

There is no form exhibiting this behaviour. Mail is generated from a contact form successfully. Pretty textbook setup.

The error is only present in Grav logs and some CLI commands, at least cache-clear and I think other(s).

Configs

Site A

email.yaml:

from: [email protected]
from_name: A website
to: [email protected]
to_name: Website A
reply_to: [email protected]
reply_to_name: Website email alt
mailer:
  engine: mailjet
content_type: text/html
debug: true # it's a dev install

email-mailjet.yaml:

enabled: true
transport: api
api_key: API_KEY_REDACTED
secret_key: SECRET_KEY_REDACTED

Site B

email.yaml:

from: [email protected]
from_name: "B website"
to: [email protected]
to_name: Website Owner
mailer:
  engine: sendinblue
content_type: text/html
debug: false # is an unlaunched prod site

email-sendinblue.yaml:

enabled: true
transport: api
access_key: ACCESS_KEY_REDACTED

Let me know if I can provide anything else.

from grav-plugin-email.

rhukster avatar rhukster commented on July 24, 2024

I can't recreate this with your maijet or sendinblue configruation. Can you look in your grav.log and see if there's more detail on where the error is happening?

Thanks.

from grav-plugin-email.

hughbris avatar hughbris commented on July 24, 2024

Thanks for trying to reproduce. Damn tho :/

bin/grav logviewer is one of the commands that work. I can't see anything in the logs. These are my logging settings just in case there's something I can set to log more: log.handler=file, errors.log=true.

I decided to test the other CLI commands bringing up this error, except server, new-project, sandbox. The only ones that brought up this error were page-system-validator, scheduler, and security.

I tested other CLI commands. bin/gpm and bin/plugin work fine except for bin/plugin email test-email ...

  • worked with the local environment flag --env where I have mailtrap setup with SMTP
  • failed for the default/prod settings (Mailjet API), with that same error in the issue title
  • switched the default config to Mailjet with SMTP, the error did not happen. I got "Problem sending email..." in the debug output but I think that is just a DKIM thing because it was runnign locally. It did seem to bypass the "user not set" error.

Hope that helps. Looks like I will be able to work around this problem easily by reverting to SMTP settings.

Just a wild idea: could this be related to having environment overrides? I use those too. My experience is that these env configs are merged opaquely by Grav by the time any plugin goes to use them.

The other mystery is why only some of my installs experience this. I can look harder for patterns there if need be.

from grav-plugin-email.

hughbris avatar hughbris commented on July 24, 2024

My pleasure to contribute.

from grav-plugin-email.

rhukster avatar rhukster commented on July 24, 2024

if you want to PM your account creds on discord, I can test again. but I don't have an active account with them anymore.

from grav-plugin-email.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.