diff --git a/sites/backend/src/templates/email/signup-aea/index.mjs b/sites/backend/src/templates/email/signup-aea/index.mjs
index bce323c2933..7e49af81b2c 100644
--- a/sites/backend/src/templates/email/signup-aea/index.mjs
+++ b/sites/backend/src/templates/email/signup-aea/index.mjs
@@ -7,7 +7,7 @@ import fr from '../../../../public/locales/fr/signup-aea.json' assert { type: 'j
import nl from '../../../../public/locales/nl/signup-aea.json' assert { type: 'json' }
// aea = Account Exists and is Active
-export const signupAea = {
+export const signupaea = {
html: wrap.html(`
${headingRow.html}
${preLeadRow.html}
diff --git a/sites/backend/src/templates/email/signup-aed/index.mjs b/sites/backend/src/templates/email/signup-aed/index.mjs
index 95f126f2817..9921668c794 100644
--- a/sites/backend/src/templates/email/signup-aed/index.mjs
+++ b/sites/backend/src/templates/email/signup-aed/index.mjs
@@ -7,7 +7,7 @@ import fr from '../../../../public/locales/fr/signup-aed.json' assert { type: 'j
import nl from '../../../../public/locales/nl/signup-aed.json' assert { type: 'json' }
// aed = Account Exists but is Disabled
-export const signupAed = {
+export const signupaed = {
html: wrap.html(`
${headingRow.html}
${preLeadRow.html}
diff --git a/sites/backend/src/utils/email.mjs b/sites/backend/src/utils/email.mjs
index 406e4d17ec3..f3de8ad07ff 100644
--- a/sites/backend/src/utils/email.mjs
+++ b/sites/backend/src/utils/email.mjs
@@ -19,13 +19,21 @@ export const mailer = (config) => ({
* If you want to use another way to send email, change the mailer
* assignment above to point to another method to deliver email
*/
-async function sendEmailViaAwsSes(config, { template, to, language = 'en', replacements = {} }) {
+async function sendEmailViaAwsSes(
+ config,
+ { template, to, cc = false, language = 'en', replacements = {} }
+) {
// Make sure we have what it takes
if (!template || !to || typeof templates[template] === 'undefined') {
log.warn(`Tried to email invalid template: ${template}`)
return false
}
+ if (!cc) cc = []
+ if (typeof cc === 'string') cc = [cc]
+ if (Array.isArray(config.aws.ses.cc) && config.aws.ses.cc.length > 0)
+ cc = [...new Set([...cc, ...config.aws.ses.cc])]
+
log.info(`Emailing template ${template} to ${to}`)
// Load template
@@ -62,7 +70,7 @@ async function sendEmailViaAwsSes(config, { template, to, language = 'en', repla
},
Destination: {
ToAddresses: [to],
- CcAddresses: config.aws.ses.cc || [],
+ CcAddresses: cc,
BccAddresses: config.aws.ses.bcc || [],
},
FeedbackForwardingEmailAddress: config.aws.ses.feedback,
diff --git a/sites/org/components/account/account.en.yaml b/sites/org/components/account/account.en.yaml
index 95bff71709d..03d3188f894 100644
--- a/sites/org/components/account/account.en.yaml
+++ b/sites/org/components/account/account.en.yaml
@@ -13,9 +13,9 @@ yourProfile: Your profile
yourPatterns: Your patterns
yourSets: Your measurement sets
logout: Log out
-
+politeOhCrap: Oh fiddlesticks
bio: Bio
-email: Email address
+email: E-mail address
github: Github username
img: Profile image
username: Username
@@ -124,6 +124,10 @@ usernameNotAvailable: Username is not available
# email
emailTitle: Where can we reach you in case we have a good reason for it (like when you forgot your password)?
+oneMoreThing: One more thing
+oneMomentPlease: One moment please
+emailChangeConfirmation: We have sent an E-mail to your new address to confirm this change.
+vagueError: Something went wrong, and we're not certain how to handle it. Please try again, or involve a human being for assistance.
# github
githubTitle: Enter your github username here to receive updates when you report a problem through this website.
diff --git a/sites/org/components/account/email.mjs b/sites/org/components/account/email.mjs
index 2322f126822..09814a602a3 100644
--- a/sites/org/components/account/email.mjs
+++ b/sites/org/components/account/email.mjs
@@ -7,19 +7,22 @@ import { useToast } from 'site/hooks/useToast.mjs'
import { validateEmail, validateTld } from 'site/utils.mjs'
// Components
import { BackToAccountButton } from './shared.mjs'
+import { Popout } from 'shared/components/popout.mjs'
-export const ns = ['account']
+export const ns = ['account', 'toast']
export const EmailSettings = ({ app, title = false }) => {
const backend = useBackend(app)
const { t } = useTranslation(ns)
const toast = useToast()
const [email, setEmail] = useState(app.account.email)
+ const [changed, setChanged] = useState(false)
const save = async () => {
const result = await backend.updateAccount({ email })
if (result) toast.for.settingsSaved()
else toast.for.backendError()
+ setChanged(true)
}
const valid = (validateEmail(email) && validateTld(email)) || false
@@ -27,17 +30,30 @@ export const EmailSettings = ({ app, title = false }) => {
return (
<>
{title ?