Skip to content

FEATURE: allow email headers to be set via variable#34

Open
LvckyAPI wants to merge 2 commits intositegeist:1.0from
LvckyAPI:main
Open

FEATURE: allow email headers to be set via variable#34
LvckyAPI wants to merge 2 commits intositegeist:1.0from
LvckyAPI:main

Conversation

@LvckyAPI
Copy link
Copy Markdown

We have built a contact form for a customer.
The reply-to address should correspond to the address that the website user entered as their own in the form.

Unfortunately, we encountered a problem:

Email "{email}" does not comply with addr-spec of RFC 2822.

With this pull request, I have built in that you can also set the e-mail headers such as: Reply address, sender address, recipient address etc. via variable

@mficzel
Copy link
Copy Markdown
Member

mficzel commented Apr 10, 2024

Thanks for the PR I totally understand the motivation.
We decided to not apply the data templates to those fields by default to avoid unneeded security risks.

The changes you suggest can be added in a project easily where one can also better reflect on wether or not they may cause trouble in the concrete use case.

However i admit that this was a very defensive decision and i did not give it that much thought. I wanted to avoid that editors can accidentally create a public email form that can send any email. That is why I made this an opt in feature one has to enable.

If you see a way to address the mentioned risks I am willing to reconsider those decisions.

Regards Martin

@LvckyAPI
Copy link
Copy Markdown
Author

Todo @LvckyAPI

  • check mail address validation to pretend to manipulate mail headers
  • add warnings if field in inspector contains variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants