Hihi
This commit is contained in:
parent
2a28b63c08
commit
7b35a3c08d
|
@ -53,6 +53,7 @@ async fn message_handler(message: String) -> Result<()> {
|
|||
let message = MessageParser::default().parse(&message).unwrap();
|
||||
|
||||
let message_body = message.body_text(0).unwrap();
|
||||
let message_subject = message.subject().unwrap();
|
||||
let message_sender = message.from().unwrap().as_list().unwrap()[0]
|
||||
.address()
|
||||
.unwrap();
|
||||
|
@ -61,7 +62,7 @@ async fn message_handler(message: String) -> Result<()> {
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
let message = format!("New mail from {message_sender}:\n{message_body}");
|
||||
let message = format!("New mail from {message_sender} with subject {}:\n{}", message_subject.trim(), message_body.trim());
|
||||
|
||||
send_message(&message).await?;
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue