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

SAK-39992: Announcements > new config to make email notification 'To' address match 'From' address if 'From' is replyable #6

Merged
merged 1 commit into from
Jul 18, 2018

Conversation

bjones86
Copy link
Member

https://jira.sakaiproject.org/browse/SAK-39992

Currently if your server has the property set to make Announcement emails 'From' address replyable (notify.email.from.replyable=true), when an announcement notification email is sent, the default 'To' address is in the format of:

"[siteTitle] <noreply@[ServerConfigurationService.getServerName()]>"

and the 'From' address is in the format of:

"[lastName, firstName] <[instructor/maintainerEmail]>"

There may be an institutional requirement or preference to control the email address used in the 'To' address, similar to how you can control the 'From' address with the existing mail.sendfromsakai sakai.property.

The only configuration option for this is the notify.email.to.replyable sakai.property, which when set to true and the site contains the Email Archive, it will use the Email Archive's 'site email address' as the 'To' address in the announcement notification emails. However, the Email Archive's email address still uses getServerName() as the domain of the email address:

"[siteTitle] <[userDefinedPrefix]@[ServerConfigurationService.getServerName()]>"

That property doesn't solve the institutional requirement.

To address this, we introduced the sakai.property announcement.notification.email.to.matches.from, which defaults to false to preserve OOTB functionality. When the property is set to true, it will use the same email address used in the 'From' address for the 'To' address as well (the instructor/maintainer's email address).

… address match 'From' address if 'From' is replyable
@bjones86
Copy link
Member Author

@jonespm in order to test this, we either need to print the emails to the logs, or set up MailCatcher for the experimental server.

Which would be preferred?

@jonespm
Copy link
Contributor

jonespm commented Jul 18, 2018

testMode@org.sakaiproject.email.api.EmailService=true

is on experimental so any emails should be logged. The only big advantage mailcatcher has is easier downloading and testing of attachments.

@jonespm jonespm merged commit baacc91 into sakaiproject:master Jul 18, 2018
@bjones86
Copy link
Member Author

I just tested on experimental, created an announcement with the email notification set to 'High'; no email was printed to the logs. I think we also need to turn on this property:

smtpDebug@org.sakaiproject.email.api.EmailService=true

@bjones86 bjones86 deleted the SAK-39992 branch July 18, 2018 20:16
@jonespm
Copy link
Contributor

jonespm commented Jul 18, 2018

Sure you can add that property

@bjones86
Copy link
Member Author

Done in #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants