Skip to content

Instantly share code, notes, and snippets.

@TheOpenDevProject
Last active January 20, 2020 20:11
Show Gist options
  • Save TheOpenDevProject/26c6869cfaa462bd95fd to your computer and use it in GitHub Desktop.
Save TheOpenDevProject/26c6869cfaa462bd95fd to your computer and use it in GitHub Desktop.
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