Skip to content

Commit d5dbb54

Browse files
committed
fix: switched emails to use alerts@ instead of supports@ (fixes #422)
1 parent 22587f7 commit d5dbb54

39 files changed

+82
-82
lines changed

app/controllers/api/v1/paypal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ async function webhook(ctx) {
820820
emailHelper({
821821
template: 'alert',
822822
message: {
823-
to: config.email.message.from,
823+
to: config.alertsEmail,
824824
subject: `Error with PayPal Webhook (Event ID ${ctx.request.body.id})`
825825
},
826826
locals: {

app/controllers/api/v1/stripe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ async function webhook(ctx) {
650650
emailHelper({
651651
template: 'alert',
652652
message: {
653-
to: config.email.message.from,
653+
to: config.alertsEmail,
654654
subject: `Error with Stripe Webhook (Event ID ${event.id})`
655655
},
656656
locals: {

app/controllers/web/my-account/cancel-subscription.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async function cancelSubscription(ctx, next) {
3232
emailHelper({
3333
template: 'alert',
3434
message: {
35-
to: config.email.message.from,
35+
to: config.alertsEmail,
3636
subject: `Error deleting Stripe subscription ID ${
3737
ctx.state.user[config.userFields.stripeSubscriptionID]
3838
} for ${ctx.state.user.email}`
@@ -58,7 +58,7 @@ async function cancelSubscription(ctx, next) {
5858
emailHelper({
5959
template: 'alert',
6060
message: {
61-
to: config.email.message.from,
61+
to: config.alertsEmail,
6262
subject: `Error deleting PayPal subscription ID ${
6363
ctx.state.user[config.userFields.paypalSubscriptionID]
6464
} for ${ctx.state.user.email}`

app/controllers/web/my-account/create-domain-billing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ async function createDomainBilling(ctx) {
166166
await emailHelper({
167167
template: 'alert',
168168
message: {
169-
to: config.email.message.from,
169+
to: config.alertsEmail,
170170
subject: `Error creating Stripe customer for ${ctx.state.user.email}`
171171
},
172172
locals: { message: err.message }

app/controllers/web/my-account/ensure-paid-to-date.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ async function ensurePaidToDate(ctx, next) {
112112
? {
113113
cc: [
114114
ctx.state.user.email
115-
// config.email.message.from
115+
// config.alertsEmail
116116
]
117117
}
118118
: {}),
119-
// : { cc: config.email.message.from }),
119+
// : { cc: config.alertsEmail }),
120120
subject: ctx.translate('PAYMENT_PAST_DUE_API_RESTRICTED')
121121
},
122122
locals: { message, user: ctx.state.user.toObject() }
@@ -141,9 +141,9 @@ async function ensurePaidToDate(ctx, next) {
141141
ctx.state.user.email,
142142
...(ctx.state.user[config.userFields.receiptEmail]
143143
? {
144-
cc: [ctx.state.user.email, config.email.message.from]
144+
cc: [ctx.state.user.email, config.alertsEmail]
145145
}
146-
: { cc: config.email.message.from }),
146+
: { cc: config.alertsEmail }),
147147
subject
148148
},
149149
locals: { message, locale: ctx.state.user[config.lastLocale] }

app/controllers/web/my-account/list-logs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ async function listLogs(ctx) {
432432
template: 'alert',
433433
message: {
434434
to: ctx.state.user.email,
435-
// bcc: config.email.message.from,
435+
// bcc: config.alertsEmail,
436436
subject: results.subject,
437437
attachments:
438438
results.count > 0

app/controllers/web/my-account/remove.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ async function remove(ctx) {
120120
await emailHelper({
121121
template: 'alert',
122122
message: {
123-
to: config.email.message.from,
123+
to: config.alertsEmail,
124124
subject: `Error deleting PayPal subscription ID ${
125125
ctx.state.user[config.userFields.paypalSubscriptionID]
126126
} for ${ctx.state.user.email}`
@@ -148,7 +148,7 @@ async function remove(ctx) {
148148
await emailHelper({
149149
template: 'alert',
150150
message: {
151-
to: config.email.message.from,
151+
to: config.alertsEmail,
152152
subject: `Error deleting Stripe subscription ID ${
153153
ctx.state.user[config.userFields.stripeSubscriptionID]
154154
} for ${ctx.state.user.email}`

app/controllers/web/my-account/retrieve-domain-billing.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ async function retrieveDomainBilling(ctx) {
669669
emailHelper({
670670
template: 'alert',
671671
message: {
672-
to: config.email.message.from,
672+
to: config.alertsEmail,
673673
subject: paymentIntent
674674
? `Error retrieving Stripe Payment Method ID ${paymentIntent.payment_method} for ${ctx.state.user.email}`
675675
: `Stripe Payment Intent/Method Error for ${ctx.state.user.email}`
@@ -718,7 +718,7 @@ async function retrieveDomainBilling(ctx) {
718718
emailHelper({
719719
template: 'alert',
720720
message: {
721-
to: config.email.message.from,
721+
to: config.alertsEmail,
722722
subject: `Error deleting Stripe subscription ID ${
723723
ctx.state.user[config.userFields.stripeSubscriptionID]
724724
} for ${ctx.state.user.email}`
@@ -807,7 +807,7 @@ async function retrieveDomainBilling(ctx) {
807807
emailHelper({
808808
template: 'alert',
809809
message: {
810-
to: config.email.message.from,
810+
to: config.alertsEmail,
811811
subject: `Error retrieving/creating stripe payment for ${ctx.state.user.email}`
812812
},
813813
locals: {
@@ -832,7 +832,7 @@ async function retrieveDomainBilling(ctx) {
832832
emailHelper({
833833
template: 'alert',
834834
message: {
835-
to: config.email.message.from,
835+
to: config.alertsEmail,
836836
subject: `Error saving user for ${ctx.state.user.email}`
837837
},
838838
locals: {
@@ -901,7 +901,7 @@ async function retrieveDomainBilling(ctx) {
901901
emailHelper({
902902
template: 'alert',
903903
message: {
904-
to: config.email.message.from,
904+
to: config.alertsEmail,
905905
subject: `Error deleting PayPal subscription ID ${
906906
ctx.state.user[config.userFields.paypalSubscriptionID]
907907
} for ${ctx.state.user.email}`
@@ -1092,7 +1092,7 @@ ${safeStringify(parseErr(err), null, 2)}</code></pre>`
10921092
emailHelper({
10931093
template: 'alert',
10941094
message: {
1095-
to: config.email.message.from,
1095+
to: config.alertsEmail,
10961096
subject: `Error retrieving/creating paypal payment for ${ctx.state.user.email}`
10971097
},
10981098
locals: {
@@ -1116,7 +1116,7 @@ ${safeStringify(parseErr(err), null, 2)}</code></pre>`
11161116
emailHelper({
11171117
template: 'alert',
11181118
message: {
1119-
to: config.email.message.from,
1119+
to: config.alertsEmail,
11201120
subject: `Error saving user for ${ctx.state.user.email}`
11211121
},
11221122
locals: {
@@ -1171,7 +1171,7 @@ ${safeStringify(parseErr(err), null, 2)}</code></pre>`
11711171
emailHelper({
11721172
template: 'alert',
11731173
message: {
1174-
to: config.email.message.from,
1174+
to: config.alertsEmail,
11751175
subject: `Error deleting PayPal subscription ID ${
11761176
ctx.state.user[config.userFields.paypalSubscriptionID]
11771177
} for ${ctx.state.user.email}`
@@ -1324,7 +1324,7 @@ ${safeStringify(parseErr(err), null, 2)}</code></pre>`
13241324
emailHelper({
13251325
template: 'alert',
13261326
message: {
1327-
to: config.email.message.from,
1327+
to: config.alertsEmail,
13281328
subject: `Error retrieving/creating paypal payment for ${ctx.state.user.email}`
13291329
},
13301330
locals: {
@@ -1349,7 +1349,7 @@ ${safeStringify(parseErr(err), null, 2)}</code></pre>`
13491349
emailHelper({
13501350
template: 'alert',
13511351
message: {
1352-
to: config.email.message.from,
1352+
to: config.alertsEmail,
13531353
subject: `Error saving user for ${ctx.state.user.email}`
13541354
},
13551355
locals: {
@@ -1412,7 +1412,7 @@ ${safeStringify(parseErr(err), null, 2)}</code></pre>`
14121412
emailHelper({
14131413
template: 'alert',
14141414
message: {
1415-
to: config.email.message.from,
1415+
to: config.alertsEmail,
14161416
subject: `Error deleting Stripe subscription ID when user set up PayPal${
14171417
ctx.state.user[config.userFields.stripeSubscriptionID]
14181418
} for ${ctx.state.user.email}`
@@ -1503,7 +1503,7 @@ ${safeStringify(parseErr(err), null, 2)}</code></pre>`
15031503
emailHelper({
15041504
template: 'alert',
15051505
message: {
1506-
to: config.email.message.from,
1506+
to: config.alertsEmail,
15071507
subject: `Error deleting Stripe subscription ID ${
15081508
ctx.state.user[config.userFields.stripeSubscriptionID]
15091509
} for ${ctx.state.user.email}`
@@ -1537,7 +1537,7 @@ ${safeStringify(parseErr(err), null, 2)}</code></pre>`
15371537
emailHelper({
15381538
template: 'alert',
15391539
message: {
1540-
to: config.email.message.from,
1540+
to: config.alertsEmail,
15411541
subject: `Error deleting PayPal subscription ID ${
15421542
ctx.state.user[config.userFields.paypalSubscriptionID]
15431543
} for ${ctx.state.user.email}`
@@ -1626,7 +1626,7 @@ ${safeStringify(parseErr(err), null, 2)}</code></pre>`
16261626
emailHelper({
16271627
template: 'alert',
16281628
message: {
1629-
to: config.email.message.from,
1629+
to: config.alertsEmail,
16301630
subject: `A refund error occurred for ${ctx.state.user.email}`
16311631
},
16321632
locals: {
@@ -1693,7 +1693,7 @@ ${safeStringify(parseErr(err), null, 2)}</code></pre>`
16931693
emailHelper({
16941694
template: 'alert',
16951695
message: {
1696-
to: config.email.message.from,
1696+
to: config.alertsEmail,
16971697
subject: `A refund error occurred for ${ctx.state.user.email}`
16981698
},
16991699
locals: {

app/controllers/web/my-account/update-card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function redirectToPortal(ctx) {
4242
await emailHelper({
4343
template: 'alert',
4444
message: {
45-
to: config.email.message.from,
45+
to: config.alertsEmail,
4646
subject: `Error creating Stripe billing portal session for customer ID ${
4747
ctx.state.user[config.userFields.stripeCustomerID]
4848
} for ${ctx.state.user.email}`

app/controllers/web/my-account/verify-smtp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ async function verifySMTP(ctx) {
172172
await emailHelper({
173173
template: 'alert',
174174
message: {
175-
to: config.supportEmail,
175+
to: config.alertsEmail,
176176
replyTo: to,
177177
subject: autoApprovalSubject
178178
},

0 commit comments

Comments
 (0)