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

feat(notifications): add email client #4002

Merged
merged 17 commits into from
Feb 20, 2024
Merged

feat(notifications): add email client #4002

merged 17 commits into from
Feb 20, 2024

Conversation

thevaibhav-dixit
Copy link
Contributor

No description provided.

@vindard
Copy link
Contributor

vindard commented Feb 15, 2024

Rebasing to this PR once it's merged should help with the integration failure
#4004

@thevaibhav-dixit thevaibhav-dixit force-pushed the email-executor branch 6 times, most recently from 1a00d71 to 9cc2422 Compare February 16, 2024 07:41
pub fn init(config: SmtpConfig) -> Result<Self, SmtpError> {
let creds = Credentials::new(config.username, config.password);
let client: AsyncSmtpTransport<Tokio1Executor> =
AsyncSmtpTransport::<Tokio1Executor>::starttls_relay("smtp.gmail.com")?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this endpoint hard coded?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was just for testing should come in via the config.


pub async fn send_email(&self, msg: LocalizedMessage) -> Result<(), SmtpError> {
let email = Message::builder()
.from(Mailbox::new(None, "some-email".parse()?))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from / to also needs setting right?

@thevaibhav-dixit thevaibhav-dixit force-pushed the email-executor branch 2 times, most recently from 923bda0 to 8466b93 Compare February 18, 2024 17:42
@@ -1,8 +1,9 @@
use serde::{Deserialize, Serialize};

use crate::push_executor::PushExecutorConfig;
use crate::{email_executor::EmailExecutorConfig, push_executor::PushExecutorConfig};

#[derive(Clone, Default, Serialize, Deserialize)]
pub struct AppConfig {
pub executor: PushExecutorConfig,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: rename this to push_executor

@thevaibhav-dixit thevaibhav-dixit force-pushed the email-executor branch 3 times, most recently from 0d581ba to b9016bb Compare February 19, 2024 11:39
@thevaibhav-dixit thevaibhav-dixit marked this pull request as ready for review February 19, 2024 13:47
@bodymindarts bodymindarts merged commit 7143999 into main Feb 20, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants