Page MenuHomePhabricator

Confirmation Email Generates Misleading Error when Time Zone is not configured
Closed, ResolvedPublic

Description

Author: leader

Description:
If the date.timezone environment variable is not set in php.ini then when
sending a confirmation email, the following error can be generated: "Could not
send confirmation mail. Check address for invalid characters." The email message
is still sent.

This is because the php mail() fuction will return a warning when the
date.timezone environment variable is not set. The UserMailer Function in
UserMailer.php returns this non-empty warning string. In User.php the function
sendMail incorrectly interprets this non-empty string as a failure. This then
propagates up to the function sendConfirmationMail in User.php and finally back
to function showRequestForm in SpecialConfirmemail.php, where the message
confirmemail_sendfailed or "Could not send confirmation mail. Check address for
invalid characters." is displayed.

Suggestions:
Change the mailing code to recognize this warning and display an appropriate
warning. Add a check to the configuration code (config/index.php) to check for
the existence of the date.timezone environment variable.


Version: unspecified
Severity: normal

Details

Reference
bz6941

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:18 PM
bzimport set Reference to bz6941.
bzimport added a subscriber: Unknown Object (MLST).

Since PHP requires the timezone to be set now, this should be considered fixed.