mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API Extension hook for email default from
This commit is contained in:
parent
09fdfc4611
commit
b73a3cdd7a
@ -215,6 +215,8 @@ email marked as spam. If you want to send from another address think about using
|
|||||||
|
|
||||||
You will also have to remove the `SS_SEND_ALL_EMAILS_FROM` environment variable if it is present.
|
You will also have to remove the `SS_SEND_ALL_EMAILS_FROM` environment variable if it is present.
|
||||||
|
|
||||||
|
If you need greater control over this email address, for instance if are running the subsites modules, you can implement the `SilverStripe\Control\Email\Email::updateDefaultFrom()` extension hook.
|
||||||
|
|
||||||
## Redirecting Emails
|
## Redirecting Emails
|
||||||
|
|
||||||
There are several other [configuration settings](/developer_guides/configuration) to manipulate the email server.
|
There are several other [configuration settings](/developer_guides/configuration) to manipulate the email server.
|
||||||
|
@ -297,6 +297,7 @@ class Email extends ViewableData
|
|||||||
}
|
}
|
||||||
$defaultFrom = sprintf('no-reply@%s', $host);
|
$defaultFrom = sprintf('no-reply@%s', $host);
|
||||||
}
|
}
|
||||||
|
$this->extend('updateDefaultFrom', $defaultFrom);
|
||||||
return $defaultFrom;
|
return $defaultFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user