-
Notifications
You must be signed in to change notification settings - Fork 145
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
Conversation
b4a89c7
to
8523e10
Compare
Rebasing to this PR once it's merged should help with the integration failure |
1a00d71
to
9cc2422
Compare
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")? |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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()?)) |
There was a problem hiding this comment.
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?
923bda0
to
8466b93
Compare
core/notifications/src/app/config.rs
Outdated
@@ -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, |
There was a problem hiding this comment.
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
0d581ba
to
b9016bb
Compare
08b4c26
to
5cc1373
Compare
No description provided.