Version 0.2.0 #2
1 changed files with 4 additions and 3 deletions
|
@ -85,8 +85,9 @@ fn main() {
|
||||||
match rx.recv() {
|
match rx.recv() {
|
||||||
Ok(data) => {
|
Ok(data) => {
|
||||||
println!("Sending mail to: {}", data[0]);
|
println!("Sending mail to: {}", data[0]);
|
||||||
let title = format!("You were mentioned in {} on {}", data[2], data[1]);
|
let id = "notarealiid@mention2mail".to_owned();
|
||||||
let body = format!("{} wrote: {}", data[3], data[4]).into_bytes();
|
let body = format!("Subject: You were mentioned in {} on {}\n{} wrote: {}",
|
||||||
|
data[2], data[1], data[3], data[4]).into_bytes();
|
||||||
let mail = lettre::SendableEmail::new(
|
let mail = lettre::SendableEmail::new(
|
||||||
lettre::Envelope::new(
|
lettre::Envelope::new(
|
||||||
Some(
|
Some(
|
||||||
|
@ -96,7 +97,7 @@ fn main() {
|
||||||
vec![
|
vec![
|
||||||
lettre::EmailAddress::new(data[0].clone()).unwrap()]
|
lettre::EmailAddress::new(data[0].clone()).unwrap()]
|
||||||
).unwrap(),
|
).unwrap(),
|
||||||
title,
|
id,
|
||||||
body
|
body
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue