Last active
January 20, 2020 20:11
-
-
Save TheOpenDevProject/26c6869cfaa462bd95fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use smtp::sender::{Sender,SenderBuilder}; | |
use smtp::email::EmailBuilder; | |
use smtp::authentication::Mecanism; | |
pub mod Notifier{ | |
struct SenderDetails{ | |
to: String, | |
to_alias: String, | |
from: String, | |
from_alias: String, | |
job_complete_message: String, | |
} | |
struct ServerDetails{ | |
server: String, | |
port: i32 | |
} | |
struct NotificationManager { | |
sender_details: SenderDetails, | |
server_details: ServerDetails, | |
} | |
impl NotificationManager{ | |
fn new(sender_details: SenderDetails, server_details: ServerDetails) -> NotificationManager { | |
NotificationManager { | |
sender_details: sender_details, | |
server_details: server_details, | |
} | |
} | |
fn send(&self){ | |
//Do stuff that accesses the "CLASS" objects like sender_details | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment