Make the mail_from configurable

I would like to make the mail_from configurable for resetting passwords.

Currently it is composed from the fixed “system” username and the URL of the server.

This can lead to problems if a user accesses the system from some wired IP address.

I suggest to add the “mail from” to the email configuration.

In the config settings like

we can add:

                        <label for="settings[smtp_mail_from]">
                            <?php _trans('smtp_mail_from'); ?>
                        </label>
                        <input type="text" name="settings[smtp_mail_from]" id="settings[smtp_mail_from]"
                               class="form-control"
                               value="<?php echo get_setting('smtp_mail_from', '', true); ?>">

and save the mail_from to the database.

In the Sessions.php we could fallback to the system@ but otherwise read the mail_from from the database or we could directly wrap it in application/modules/mailer/helpers/phpmailer_helper.php.

There is an open dev ticket for this here:
https://development.invoiceplane.com/browse/IP-596

@nmay1990 Thanks, so I have something to refer my pull request to :slight_smile:

See Bug Regression - Password Reset e-mail