Fixing formatting for gmail_oauth2 example
This commit is contained in:
parent
75c4268e4e
commit
ed03acf07d
1 changed files with 12 additions and 14 deletions
|
|
@ -29,20 +29,18 @@ fn main() {
|
||||||
imap_socket.authenticate("XOAUTH2", gmail_auth).unwrap();
|
imap_socket.authenticate("XOAUTH2", gmail_auth).unwrap();
|
||||||
|
|
||||||
match imap_socket.select("INBOX") {
|
match imap_socket.select("INBOX") {
|
||||||
Ok(mailbox) => {
|
Ok(mailbox) => println!("{}", mailbox),
|
||||||
println!("{}", mailbox);
|
Err(e) => println!("Error selecting INBOX: {}", e)
|
||||||
},
|
};
|
||||||
Err(e) => println!("Error selecting INBOX: {}", e)
|
|
||||||
};
|
|
||||||
|
|
||||||
match imap_socket.fetch("2", "body[text]") {
|
match imap_socket.fetch("2", "body[text]") {
|
||||||
Ok(lines) => {
|
Ok(lines) => {
|
||||||
for line in lines.iter() {
|
for line in lines.iter() {
|
||||||
print!("{}", line);
|
print!("{}", line);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Err(e) => println!("Error Fetching email 2: {}", e)
|
Err(e) => println!("Error Fetching email 2: {}", e)
|
||||||
};
|
};
|
||||||
|
|
||||||
imap_socket.logout().unwrap();
|
imap_socket.logout().unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue