diff --git a/crates/router/src/consts/user.rs b/crates/router/src/consts/user.rs
index aa42799208..32ca4ad31d 100644
--- a/crates/router/src/consts/user.rs
+++ b/crates/router/src/consts/user.rs
@@ -41,3 +41,5 @@ pub const EMAIL_SUBJECT_INVITATION: &str = "You have been invited to join Hypers
pub const EMAIL_SUBJECT_MAGIC_LINK: &str = "Unlock Hyperswitch: Use Your Magic Link to Sign In";
pub const EMAIL_SUBJECT_RESET_PASSWORD: &str = "Get back to Hyperswitch - Reset Your Password Now";
pub const EMAIL_SUBJECT_NEW_PROD_INTENT: &str = "New Prod Intent";
+pub const EMAIL_SUBJECT_WELCOME_TO_COMMUNITY: &str =
+ "Thank you for signing up on Hyperswitch Dashboard!";
diff --git a/crates/router/src/core/user.rs b/crates/router/src/core/user.rs
index bff6205f5d..eedd9ac567 100644
--- a/crates/router/src/core/user.rs
+++ b/crates/router/src/core/user.rs
@@ -246,26 +246,41 @@ pub async fn connect_account(
)
.await?;
- let email_contents = email_types::VerifyEmail {
+ let magic_link_email = email_types::VerifyEmail {
recipient_email: domain::UserEmail::from_pii_email(user_from_db.get_email())?,
settings: state.conf.clone(),
subject: consts::user::EMAIL_SUBJECT_SIGNUP,
auth_id,
};
- let send_email_result = state
+ let magic_link_result = state
.email_client
.compose_and_send_email(
- Box::new(email_contents),
+ Box::new(magic_link_email),
state.conf.proxy.https_url.as_ref(),
)
.await;
- logger::info!(?send_email_result);
+ logger::info!(?magic_link_result);
+
+ let welcome_to_community_email = email_types::WelcomeToCommunity {
+ recipient_email: domain::UserEmail::from_pii_email(user_from_db.get_email())?,
+ subject: consts::user::EMAIL_SUBJECT_WELCOME_TO_COMMUNITY,
+ };
+
+ let welcome_email_result = state
+ .email_client
+ .compose_and_send_email(
+ Box::new(welcome_to_community_email),
+ state.conf.proxy.https_url.as_ref(),
+ )
+ .await;
+
+ logger::info!(?welcome_email_result);
return Ok(ApplicationResponse::Json(
user_api::ConnectAccountResponse {
- is_email_sent: send_email_result.is_ok(),
+ is_email_sent: magic_link_result.is_ok(),
user_id: user_from_db.get_user_id().to_string(),
},
));
diff --git a/crates/router/src/services/email/assets/welcome_to_community.html b/crates/router/src/services/email/assets/welcome_to_community.html
new file mode 100644
index 0000000000..05f7fac1d5
--- /dev/null
+++ b/crates/router/src/services/email/assets/welcome_to_community.html
@@ -0,0 +1,306 @@
+
+
+
+
+
+
+ Email Template
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Welcome to
+ Hyperswitch
+
+
+
+
+
+
+
+
+
+
+
Hello,
+
I wanted to reach out and introduce our community to
+ you.
+
I’m Neeraj. I work in Community Growth here at
+ Hyperswitch. We are a bunch of passionate people solving for payment diversity,
+ complexity, and innovation. Juspay, our parent organization, processes 125 Mn
+ transactions every day and has been providing payment platform solutions to large
+ digital enterprises for the past 12 years. We wish to empower global businesses to
+ expand their reach and enhance customer experiences through diverse payment
+ solutions.
+
Our mission is to provide a Fast, Reliable, Affordable &
+ Transparent payments platform, allowing businesses the flexibility to choose between
+ open-source and SaaS solution.