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

feat: mail provider settings #48134

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

SebastianKrupinski
Copy link
Contributor

@SebastianKrupinski SebastianKrupinski marked this pull request as draft September 17, 2024 11:48
@SebastianKrupinski SebastianKrupinski self-assigned this Sep 17, 2024
@SebastianKrupinski SebastianKrupinski added the 3. to review Waiting for reviews label Sep 17, 2024
@SebastianKrupinski SebastianKrupinski marked this pull request as ready for review September 17, 2024 13:28
@SebastianKrupinski
Copy link
Contributor Author

image

New setting in administration section

@SebastianKrupinski
Copy link
Contributor Author

@marcoambrosini

Copy link
Contributor

@kesselb kesselb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config.sample.php needs an update

'section_id' => 'server',
'storage_type' => DeclarativeSettingsTypes::STORAGE_TYPE_EXTERNAL,
'title' => $this->l->t('System Mails'),
'description' => $this->l->t('System e-mails are messages generated automatically by Nextcloud. They are sent for example when a share is created or when inviting attendees to a calendar event..'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are sent for example when a share is created

I find it weird to use "share is created" as an example because we don't use the mail provider there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what design wanted...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm quite sure that design wanted a description of what the feature actually does. I can't imagine that design asked you to mention in the description that this feature toggle affects the behavior of the sharebyemail provider, whereas it doesn't affect it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, if we don't use the mail provider there than the example is wrong and we should change it to something that is actually affected by the setting

apps/settings/lib/Listener/MailSettingsEventListener.php Outdated Show resolved Hide resolved
apps/dav/lib/CalDAV/Schedule/IMipPlugin.php Outdated Show resolved Hide resolved
apps/dav/lib/CalDAV/Schedule/IMipPlugin.php Outdated Show resolved Hide resolved
apps/dav/lib/CalDAV/Schedule/IMipPlugin.php Outdated Show resolved Hide resolved
return;
}

if ($event instanceof DeclarativeSettingsSetValueEvent) {

Check notice

Code scanning / Psalm

RedundantConditionGivenDocblockType

Docblock-defined type OCP\Settings\Events\DeclarativeSettingsSetValueEvent for $event is always OCP\Settings\Events\DeclarativeSettingsSetValueEvent
@SebastianKrupinski
Copy link
Contributor Author

image

Latest version

Copy link
Member

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ from design

apps/dav/lib/CalDAV/Schedule/IMipPlugin.php Outdated Show resolved Hide resolved
'section_type' => DeclarativeSettingsTypes::SECTION_TYPE_ADMIN,
'section_id' => 'server',
'storage_type' => DeclarativeSettingsTypes::STORAGE_TYPE_EXTERNAL,
'title' => $this->l->t('System Mails'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to use Mail Providers instead of System Mails. System Mails can mean anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what design approved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spoke with Marco, and he's okay with adjusting the text to make the feature easier to understand.

'section_id' => 'server',
'storage_type' => DeclarativeSettingsTypes::STORAGE_TYPE_EXTERNAL,
'title' => $this->l->t('System Mails'),
'description' => $this->l->t('System emails are automatically generated by Nextcloud when people perform actions like inviting others to calendar events.'),
Copy link
Contributor

@kesselb kesselb Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about:

Nextcloud 30 introduced a feature called mail provider to send emails through the user's personal email account when possible. Currently, it only works with calendar invitations. You need Nextcloud 30, Nextcloud Mail 4.1 and there must be an email account in Nextcloud Mail matching the email address of the user in Nextcloud.

I think we should try to explain what's necessary to make the feature work. The requirements Mail 4.0 + a matching email account should be explained somewhere, how should a user otherwise know how it works?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be documented once it is actual merged.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it would be really helpful to adjust the description here, making the function easier to understand.

apps/settings/lib/Settings/Admin/SystemMail.php Outdated Show resolved Hide resolved
apps/settings/lib/Listener/SystemMailSettingsListener.php Outdated Show resolved Hide resolved
apps/settings/lib/Listener/SystemMailSettingsListener.php Outdated Show resolved Hide resolved
apps/settings/lib/Listener/SystemMailSettingsListener.php Outdated Show resolved Hide resolved
@kesselb
Copy link
Contributor

kesselb commented Sep 24, 2024

The Linter is failing.

@kesselb kesselb dismissed their stale review September 25, 2024 09:09

config.sample.php update no longer required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
Status: 🏗️ In progress
Development

Successfully merging this pull request may close these issues.

5 participants