Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Mar 2008 at 16:30 UTC
Updated:
7 Oct 2013 at 08:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
keith.smith commentedThere is a patch, so CNR.
bjaspan: if you have to reroll for some other reason,
I think "to give if" should be "to get it" maybe?
Comment #2
robin monks commentedPatch fails to apply to HEAD.
Robin
Comment #3
jeffschulerRe-rolled against current D7 HEAD.
Changed "to give if" to "to give it", and changed double-spaces to singles after sentences in comments.
Comment #4
cburschkaDrupal already has a mechanism to allow settings.php to override system variables. It would be better to use the $conf array and variable_get() instead of creating a new global.
Edit: As for the auto-detection, this would be best done in mail.inc in a constant.
As in:
Then while building the mail:
And in default.settings.php, something like:
Comment #5
jeffschulerThanks Arancaytar, that made sense to me and was helpful.
I've incorporated your suggestions -- suitably, I hope.
Comment #6
dale42Tested on a Windows XP system running XAMPP.
XAMPP includes a copy of sendmail.exe which can be optionally used instead of SMTP/smtp_port option.
I tested pre and post patch with both mail configuration options (SMTP and sendmail_path).
Mail was generated by blocking/unblocking an account.
In both mail configurations, mail worked before the patch and continued to work after the patch.
So although the patch isn't required for this configuration, it didn't break anything, either.
Comment #8
jeffschulerI just re-tested applying to HEAD and had no problem.
I'm setting back to needs review to ask Testbot for another try.
Comment #10
jeffschulerupdated for HEAD
Comment #11
bjaspan commentedRTBC.
Comment #12
webchickCool. Makes sense to me. Committed to HEAD. Thanks!
Comment #13
moshe weitzman commentedPlease revert. We don't use our main settings file as a place to do random documentation and overriding. This was mentioned in #4. This should be a regular old pref in a settings page.
Comment #14
moshe weitzman commentedComment #15
webchickI disagree with making this a full-blown setting. But Moshe is right that we don't want to clobber the default.settings.php file with odd-ball settings that only 1/100000000 sites will need to monkey with. It seems like the constant should guess the right thing on 99% of servers.
Incidentally, it's probably about time for one of these http://api.drupal.org/api/globals but for variables for cases exactly like this.
Comment #16
webchickOk, created #620650: Create a variables.php for documenting hidden variables as a follow-up to cover cases like this.
Also reverted the default.settings.php hunk, and adjusted the comment in mail.sending.inc accordingly.
Comment #18
marco68 commentedHi, I report that in my system (win7x64, IIS, php 5.3.2, Drupal 7.12) :
My PHP variables (getted with phpinfo):
_SERVER["windir"] E:\WINDOWSNote the lower case on variable name_SERVER["SERVER_SOFTWARE"] Microsoft-IIS/6.0So the proposed patch does't work for me and I cannot send mail without override
$conf['mail_line_endings'].Without the override outgoing messages contains single
\n.Regards
Marco
Comment #19
shakyjake commentedWindows Server 2008 R2 / D7.23 / PHP 5.3.24 / IIS 7.5
This isn't working out-of-the-box for me as both
isset($_SERVER['WINDIR'])andstrpos($_SERVER['SERVER_SOFTWARE'], 'Win32')are returning falseIn order to fix it I added the following check to MAIL_LINE_ENDINGS definition-
|| strpos($_SERVER['SERVER_SOFTWARE'], 'IIS/7.5')Just in case anyone finds themselves in the same situation and comes across this thread.