Closed joeholdcroft closed 11 years ago
3 seems a little confusing, I may be misunderstanding it but could you not then set multiple defaults for the same 'from' email? I'm also not sure why it would be the commerce cogule that would be setting it?
Could this not be set in the installation?
To me it seems like there should be a standard config for things like site title and emails. Possibly installed from cog so it is not dependant on anything?
3 seems a little confusing, I may be misunderstanding it but could you not then set multiple defaults for the same 'from' email? I'm also not sure why it would be the commerce cogule that would be setting it?
@thomasjthomasj Nah if you called the ->setDefaultFrom()
or whatever it would end up being, it would just overwrite the previously set one.. if one was previously set, that is.
It occurs to me we don't even need new code to achieve this. We can do something like this from with a cogule's services bootstrap:
$services['mail.message'] = $services->extend('mail.message', function($message) {
$message->setFrom('default@website.com', 'Website name'); // or get these from a config or whatever
return $message;
});
I like that. Then the controller can call ->setFrom()
again if they like to change it.
To me it seems like there should be a standard config for things like site title and emails. Possibly installed from cog so it is not dependant on anything?
@lsjroberts fair point, I have often thought this might be worthwhile though it's often seemed a bit odd to me.
This could come from the
merchant
config file, but that is on a cogule that is not required by this cogule.So the way I see it we could go one of three ways:
merchant
config, if themerchant
config group existsThoughts @messagedigital/back-end-developers ? I'm leaning towards option 3.