Skip to content

add configurable email signature for all outgoing mail notifications#44

Merged
sedan07 merged 1 commit intofiveai:2.6from
qwertiko:notification-signature
Feb 25, 2021
Merged

add configurable email signature for all outgoing mail notifications#44
sedan07 merged 1 commit intofiveai:2.6from
qwertiko:notification-signature

Conversation

@qwertiko
Copy link
Copy Markdown

let me know if this {!! Config::get('setting.mail_signature') !!} is no good. I'll then add a mail_stylesheet option, too.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 25, 2021

Codecov Report

Merging #44 (1b83580) into 2.5 (3540e81) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.5      #44      +/-   ##
============================================
- Coverage     55.82%   55.77%   -0.05%     
- Complexity     1265     1267       +2     
============================================
  Files           275      275              
  Lines          4804     4810       +6     
============================================
+ Hits           2682     2683       +1     
- Misses         2122     2127       +5     
Impacted Files Coverage Δ Complexity Δ
.../Http/Controllers/Dashboard/SettingsController.php 0.00% <0.00%> (ø) 41.00 <0.00> (+2.00)
app/Http/Controllers/Dashboard/ApiController.php 50.00% <0.00%> (-2.50%) 9.00% <0.00%> (ø%)
app/Integrations/Core/System.php 87.17% <0.00%> (+2.56%) 13.00% <0.00%> (ø%)
app/Presenters/ComponentPresenter.php 100.00% <0.00%> (+5.26%) 10.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3540e81...1b83580. Read the comment docs.

@sedan07
Copy link
Copy Markdown

sedan07 commented Feb 25, 2021

@qwertiko nice! Looks good to me. mail_stylesheet sounds great. Thanks!

@sedan07
Copy link
Copy Markdown

sedan07 commented Feb 25, 2021

will a mail_stylesheet work? My knowledge of HTML Email is rather dated but it used to be the case that CSS needed to be inline in HTML emails for it to work reliably. - this might of changed mind.

@qwertiko
Copy link
Copy Markdown
Author

This implementation does not strip style attributes from the html or sanitize the mail_signature input in any other way. Neither on saving nor on including in mails.

One could argue with compromised systems injecting stuff into the database. However, a compromised system could also tweak templates. Also, I believe it is fair to trust email clients.

It is possible to sanitize html and require inline css in order to style the signature html stuff, which could be accomplished with a separate mail_stylesheet option. However I would assume that this is not necessary and that this implementation would suffice.

@sedan07
Copy link
Copy Markdown

sedan07 commented Feb 25, 2021

@qwertiko sorry miss read your first comment thought you meant you'd add the css option as well as this, not instead of. 🤦

Yes this looks fine as it is. I'm thinking it should go into a 2.6 branch instead as it's a little more than a patch fix :-), there's a 2.6 branch now created to point this PR at .

@sedan07 sedan07 changed the base branch from 2.5 to 2.6 February 25, 2021 17:42
@sedan07 sedan07 merged commit 80b3bac into fiveai:2.6 Feb 25, 2021
@dihedral dihedral deleted the notification-signature branch February 26, 2021 09:02
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.

4 participants