diff options
author | Bennet Becker <dev@bennet.cc> | 2023-01-03 15:03:40 +0100 |
---|---|---|
committer | Bennet Becker <dev@bennet.cc> | 2023-01-03 15:15:35 +0100 |
commit | 4dc09571648634d23880cc04f958d4ff3d1ace68 (patch) | |
tree | 20ae8cc213280faefc6e1b1cb85ef703d7b8b7cd /lib/public | |
parent | 9d9a0b7e06f1a6879658d227a5f8bb4dfbdf056a (diff) | |
download | nextcloud-server-4dc09571648634d23880cc04f958d4ff3d1ace68.tar.gz nextcloud-server-4dc09571648634d23880cc04f958d4ff3d1ace68.zip |
refactor AutoSubmittedValue to Headers\AutoSubmitted and adding
header name to constants
Signed-off-by: Bennet Becker <dev@bennet.cc>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/Mail/Headers/AutoSubmitted.php (renamed from lib/public/Mail/AutoSubmittedValue.php) | 19 | ||||
-rw-r--r-- | lib/public/Mail/IMessage.php | 2 |
2 files changed, 15 insertions, 6 deletions
diff --git a/lib/public/Mail/AutoSubmittedValue.php b/lib/public/Mail/Headers/AutoSubmitted.php index 3cf669d00f7..73bd35e129e 100644 --- a/lib/public/Mail/AutoSubmittedValue.php +++ b/lib/public/Mail/Headers/AutoSubmitted.php @@ -23,7 +23,7 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -namespace OCP\Mail; +namespace OCP\Mail\Headers; /** * Keyword values for the Auto-Submitted email header, as per RFC 3834. @@ -35,7 +35,16 @@ namespace OCP\Mail; * * @since 26.0.0 */ -final class AutoSubmittedValue { +final class AutoSubmitted { + + /** + * Name of the Header as used in the final message later + * + * @var string + * @since 26.0.0 + */ + public const HEADER = 'Auto-Submitted'; + /** * Indicates that a message was NOT automatically generated, but was * created by a human (or following human interaction). It is the equivalent @@ -44,7 +53,7 @@ final class AutoSubmittedValue { * @var string * @since 26.0.0 */ - public const NO = 'no'; + public const VALUE_NO = 'no'; /** * Indicates that a message was generated by an automatic process, and is @@ -53,7 +62,7 @@ final class AutoSubmittedValue { * @var string * @since 26.0.0 */ - public const AUTO_GENERATED = 'auto-generated'; + public const VALUE_AUTO_GENERATED = 'auto-generated'; /** * Indicates that a message was automatically generated as a direct response @@ -62,5 +71,5 @@ final class AutoSubmittedValue { * @var string * @since 26.0.0 */ - public const AUTO_REPLIED = 'auto-replied'; + public const VALUE_AUTO_REPLIED = 'auto-replied'; } diff --git a/lib/public/Mail/IMessage.php b/lib/public/Mail/IMessage.php index 352c47022fd..c53ab12bbb7 100644 --- a/lib/public/Mail/IMessage.php +++ b/lib/public/Mail/IMessage.php @@ -98,7 +98,7 @@ interface IMessage { * Add the Auto-Submitted header to the email, preventing most automated * responses to automated messages. * - * @param AutoSubmittedValue::* $value (one of AutoSubmittedValue::NO, AutoSubmittedValue::AUTO_GENERATED, AutoSubmittedValue::AUTO_REPLIED) + * @param AutoSubmitted::VALUE_* $value (one of AutoSubmitted::VALUE_NO, AutoSubmitted::VALUE_AUTO_GENERATED, AutoSubmitted::VALUE_AUTO_REPLIED) * @return IMessage * @since 26.0.0 */ |