Fix sender email address for invoicing alerts

It was failing to send alert emails because the email address it was
constructing did not have permission through GAE to send emails. This switches
it over to using the send from email address already in use elsewhere in the app
that does successfully send emails.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219812019
This commit is contained in:
mcilwain 2018-11-02 09:36:50 -07:00 committed by Michael Muller
parent 6a870e5820
commit f59005ad35
6 changed files with 14 additions and 29 deletions

View file

@ -827,20 +827,6 @@ public final class RegistryConfig {
return config.misc.alertRecipientEmailAddress;
}
/**
* Returns the email address we send emails from.
*
* @see google.registry.reporting.icann.ReportingEmailUtils
* @see google.registry.reporting.billing.BillingEmailUtils
* @see google.registry.reporting.spec11.Spec11EmailUtils
*/
@Provides
@Config("alertSenderEmailAddress")
public static String provideAlertSenderEmailAddress(
@Config("projectId") String projectId, RegistryConfigSettings config) {
return String.format("%s-no-reply@%s", projectId, config.misc.alertEmailSenderDomain);
}
/**
* Returns the email address to which spec 11 email should be replied.
*

View file

@ -161,7 +161,6 @@ public class RegistryConfigSettings {
public String sheetExportId;
public String alertRecipientEmailAddress;
public String spec11ReplyToEmailAddress;
public String alertEmailSenderDomain;
public int asyncDeleteDelaySeconds;
}

View file

@ -22,6 +22,9 @@ gSuite:
domainName: domain-registry.example
# Display name and email address used on outgoing emails through G Suite.
# The email address must be valid and have permission in the GAE app to send
# emails. For more info see:
# https://cloud.google.com/appengine/docs/standard/java/mail/#who_can_send_mail
outgoingEmailDisplayName: Example Registry
outgoingEmailAddress: noreply@project-id.appspotmail.com
@ -343,9 +346,6 @@ misc:
# to be a deliverable email address in case the registrars want to contact us.
spec11ReplyToEmailAddress: reply-to@example.com
# Domain for the email address we send alert summary emails from.
alertEmailSenderDomain: appspotmail.com
# How long to delay processing of asynchronous deletions. This should always
# be longer than eppResourceCachingSeconds, to prevent deleted contacts or
# hosts from being used on domains.