Updating version

This commit is contained in:
Matt McCoy 2017-05-02 21:54:44 -04:00 committed by Matt McCoy
parent 89a8d0eaf3
commit 3b6816b732
4 changed files with 6 additions and 5 deletions

View file

@ -1,7 +1,7 @@
[package] [package]
name = "imap" name = "imap"
version = "0.2.1" version = "0.3.1"
authors = ["Matt McCoy <mattnenterprise@yahoo.com>"] authors = ["Matt McCoy <mattnenterprise@yahoo.com>"]
documentation = "http://mattnenterprise.github.io/rust-imap" documentation = "http://mattnenterprise.github.io/rust-imap"
repository = "https://github.com/mattnenterprise/rust-imap" repository = "https://github.com/mattnenterprise/rust-imap"

View file

@ -15,13 +15,14 @@ Here is a basic example of using the client. See the examples directory for more
extern crate imap; extern crate imap;
extern crate openssl; extern crate openssl;
use openssl::ssl::{SslContext, SslMethod}; use openssl::ssl::{SslConnectorBuilder, SslMethod};
use imap::client::Client; use imap::client::Client;
// To connect to the gmail IMAP server with this you will need to allow unsecure apps access. // To connect to the gmail IMAP server with this you will need to allow unsecure apps access.
// See: https://support.google.com/accounts/answer/6010255?hl=en // See: https://support.google.com/accounts/answer/6010255?hl=en
// Look at the gmail_oauth2.rs example on how to connect to a gmail server securely.
fn main() { fn main() {
let mut imap_socket = Client::secure_connect(("imap.gmail.com", 993), SslContext::new(SslMethod::Sslv23).unwrap()).unwrap(); let mut imap_socket = Client::secure_connect(("imap.gmail.com", 993), "imap.gmail.com", SslConnectorBuilder::new(SslMethod::tls()).unwrap().build()).unwrap();
imap_socket.login("username", "password").unwrap(); imap_socket.login("username", "password").unwrap();