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

refactor(recon): update recipient email and mail body for ProFeatureRequest #3381

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/router/src/routes/recon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ pub async fn send_recon_request(
user_name: UserName::new(user_from_db.name)
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed to form username")?,
recipient_email: UserEmail::from_pii_email(user_from_db.email.clone())
recipient_email: UserEmail::new(Secret::new("[email protected]".to_string()))
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed to convert to UserEmail from pii::Email")?,
.attach_printable("Failed to convert recipient's email to UserEmail")?,
settings: state.conf.clone(),
subject: format!(
"Dashboard Pro Feature Request by {}",
Expand Down Expand Up @@ -187,7 +187,7 @@ pub async fn recon_merchant_account_update(
let email_contents = email_types::ReconActivation {
recipient_email: UserEmail::from_pii_email(user_email.clone())
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed to convert to UserEmail from pii::Email")?,
.attach_printable("Failed to convert recipient's email to UserEmail from pii::Email")?,
user_name: UserName::new(Secret::new("HyperSwitch User".to_string()))
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed to form username")?,
Expand Down
24 changes: 11 additions & 13 deletions crates/router/src/services/email/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,17 @@ pub mod html {
merchant_id,
user_name,
user_email,
} => {
format!(
"Dear Hyperswitch Support Team,

Dashboard Pro Feature Request,
Feature name : {feature_name}
Merchant ID : {merchant_id}
Merchant Name : {user_name}
Email : {user_email}

(note: This is an auto generated email. use merchant email for any further comunications)",
)
}
} => format!(
"Dear Hyperswitch Support Team,

Dashboard Pro Feature Request,
Feature name : {feature_name}
Merchant ID : {merchant_id}
Merchant Name : {user_name}
Email : {user_email}

(note: This is an auto generated email. Use merchant email for any further communications)",
),
}
}
}
Expand Down
Loading