-
Notifications
You must be signed in to change notification settings - Fork 34
Improved email title #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
8be08e8 has the same unhealthy obsession with |
Alrighty then, attached new commits. Is this version better? |
What does 8e6b17b have to do with improving the e-mail title? Other problems with that commit:
For 49bb392:
|
This seems uneccessary, but will mainly help avoid merge conflicts in future changes. - `$subject` is defined elsewhere (but immediately set to `$SUBJECT`) - `$msg` renamed to `$message`. I'm not poor; I can afford 4 extra characters - `$headers` is a separate variable rather than passed directly as a string
Currently only used in one place, but will be used more in the future.
The header is now properly cleaned to avoid at least one form of email injection (even in case the blog owner accidentally puts a bad email address in the `$EMAIL_ADDRESS` variable. Both functions taken from http://mattgeri.com/blog/2012/01/escaping-input-to-the-php-mail-function/ (should I include attribution in the code as well?)
I created that extra commit so the two issues could have a common ancestor; this was for two reasons:
I have a third version of this issue as well, but I'll wait until issue #8 is resolved in case there is anything in commits 105d5b3 to 835d290 that still needs improvement. The truth is, I'm mostly working my way up to the version I'm using on my blog (and as you have noted, still has a few things that need and will be fixed), but taking it one significant change at a time. I really appreciate you taking the time to go through my changes, making clear what is wrong with them, and suggesting fixes or improvements. I don't get that sort of help when working on my own projects. |
The title of the email sent out by `commentsubmit.php` has been improved to "Comment from <name> on '<post title>'" making it easier to sort comments when they get to your inbox.
The title of the email sent out by
commentsubmit.php
has been improved tomaking it easier to sort out when it gets to the inbox.