Skip to content
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

New config entry to set email name in email FROM field #8252

Closed
sebastianpiskorski opened this issue Jun 30, 2015 · 7 comments
Closed

New config entry to set email name in email FROM field #8252

sebastianpiskorski opened this issue Jun 30, 2015 · 7 comments
Assignees
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@sebastianpiskorski
Copy link
Contributor

Current solution allows only to set email address, bout doesn't allow to set its name.

https://github.com/piwik/piwik/blob/2.14.0-rc1/core/Mail.php#L43-L47

This should be more flexible, because changing a translation is not always possible.

@tsteur
Copy link
Member

tsteur commented Jun 30, 2015

Can you give us a bit more information here? When do you want to call it? What is the problem you want to solve?

@quba
Copy link
Contributor

quba commented Jul 1, 2015

To be able to use custom name for scheduled reports sender. It's possible to configure it for password recovery but there's no config option for scheduled reports.

@sebastianpiskorski
Copy link
Contributor Author

@tsteur Please correct me if I'm wrong. Piwik uses class \Piwik\Mail to send Mail. And this is the place, where the From and ReplyTo and others fields are set. Theoretically it is set in \Piwik\Mail::setFrom() but for real part of it happens in \Piwik\Mail::setDefaultFromPiwik(). And email address can be changed from config, but email alias/name is taken from Translation. It might be good solution for single instance Piwik, but it is impossible to change it for multi instance Piwik, as every instance uses same translations. Also changing ReplyTo field happens somewhere above this class, and there is no global config to change it on the end.

To sum up, I think that there should be not mandatory global config, that allows to change final form of From and Reply to fields. At least some clients requests it.

Maybe a \Piwik\Mail::setDefaultFromPiwik() would be a good place to implement it, instead of taking email alias from translation.

@tsteur
Copy link
Member

tsteur commented Jul 2, 2015

I understood the technical part but was more interested in the problem that you're trying to solve from a user perspective. So we can think about the best solution.

From @quba I understood it should be different for scheduled reports? Only there or should the "from" be different everywhere?

To sum up, I think that there should be not mandatory global config, that allows to change final form of From and Reply to fields. At least some clients requests it.

Here I understand it should be configured and applied everywhere?

It would be often good to know the background... meaning eg what is the problem and how would it "look" when the problem is solved. All rather from a user point of view than technical.

To sum up. Is it okay if we add a new config where the email alias can be configured?

@quba
Copy link
Contributor

quba commented Jul 2, 2015

In general it should be possible to change the alias in all e-mails that Piwik sends to end users (currently most of the cases are covered).

To sum up. Is it okay if we add a new config where the email alias can be configured?

yes, that would be great ;)

@sebastianpiskorski
Copy link
Contributor Author

To sum up. Is it okay if we add a new config where the email alias can be configured?

👍

@mattab mattab added the Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. label Jul 15, 2015
@mattab mattab added this to the 2.15.0 milestone Jul 15, 2015
@tsteur tsteur self-assigned this Jul 29, 2015
@tsteur tsteur changed the title There should be a possibility to set email name in email FROM field. New config entry to set email name in email FROM field Jul 31, 2015
@quba
Copy link
Contributor

quba commented Jul 31, 2015

great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

4 participants