-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Adding option to set Auto-Submitted email header #35876
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b3d9b57
Adding API method to set the Auto-Submitted header to OCP\Mail\IMessage
bennet0496 7a9f4fb
Setting Auto-Submitted header for calendar events and new user mail
bennet0496 c1c6d21
fix getAutoSubmitted return type and adding unit tests
bennet0496 77569ba
ran build/autoloaderchecker.sh after adding AutoSubmittedValue class
bennet0496 eec1ebb
Updating unit test for NewUserMailHelper, to test for autosumbitted
bennet0496 4b992cd
Update PHPDoc annotation in lib/public/Mail/IMessage.php
bennet0496 411467a
fix static-analysis error and formatting code
bennet0496 f5bf251
revert .htaccess to commit previous to PR
bennet0496 04c3c87
Revert "ran build/autoloaderchecker.sh after adding AutoSubmittedValu…
bennet0496 9d9a0b7
use constant as default value in value getter
bennet0496 4dc0957
refactor AutoSubmittedValue to Headers\AutoSubmitted and adding
bennet0496 bd846df
updating autoloader files
bennet0496 5a1cc8d
update usages of AutoSubmittedValue to AutoSubmitted::VALUE_
bennet0496 c8bde16
fix missing class in NewUserMailHelper and static code analysis errors
bennet0496 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * @copyright Copyright (c) 2022 Bennet Becker <[email protected]> | ||
| * | ||
| * @author Bennet Becker <[email protected]> | ||
| * | ||
| * @license GNU AGPL version 3 or any later version | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU Affero General Public License as | ||
| * published by the Free Software Foundation, either version 3 of the | ||
| * License, or (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU Affero General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Affero General Public License | ||
| * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| * | ||
| */ | ||
| namespace OCP\Mail\Headers; | ||
|
|
||
| /** | ||
| * Keyword values for the Auto-Submitted email header, as per RFC 3834. | ||
| * | ||
| * The value "auto-notified" as per RFC 5436 is deliberately omitted as it is | ||
| * meant of notification of the sieve system. | ||
| * | ||
| * @link https://www.iana.org/assignments/auto-submitted-keywords/auto-submitted-keywords.xhtml | ||
| * | ||
| * @since 26.0.0 | ||
| */ | ||
| 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 | ||
| * to the absence of an Auto-Submitted header altogether. | ||
| * | ||
| * @var string | ||
| * @since 26.0.0 | ||
| */ | ||
| public const VALUE_NO = 'no'; | ||
|
|
||
| /** | ||
| * Indicates that a message was generated by an automatic process, and is | ||
| * not a direct response to another message | ||
| * | ||
| * @var string | ||
| * @since 26.0.0 | ||
| */ | ||
| public const VALUE_AUTO_GENERATED = 'auto-generated'; | ||
|
|
||
| /** | ||
| * Indicates that a message was automatically generated as a direct response | ||
| * to another message. | ||
| * | ||
| * @var string | ||
| * @since 26.0.0 | ||
| */ | ||
| public const VALUE_AUTO_REPLIED = 'auto-replied'; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.