IMAP, POP, and SMTP  |  Gmail  |  Google for Developers (2024)

For non-Gmail clients, Gmail supports the standard IMAP, POP, and SMTP protocols. The Gmail IMAP, POP, and SMTP servers have been extended to support authorization via the industry-standard OAuth 2.0 protocol.

Protocol

IMAP, POP, and SMTP use the standard Simple Authentication and Security Layer (SASL), using the built-in the native IMAP AUTHENTICATE, POP AUTH, and SMTP AUTH commands, to authenticate users. The SASL XOAUTH2 mechanism enables clients to provide OAuth 2.0 credentials for authentication. The SASL XOAUTH2 protocol documentation describes the SASL XOAUTH2 mechanism in great detail, and libraries and samples which have implemented the protocol are available.

Incoming connections to the IMAP server at imap.gmail.com:993 and the POP server at pop.gmail.com:995 require SSL. The outgoing SMTP server, smtp.gmail.com, supports TLS. If your client begins with plain text, before issuing the STARTTLS command, use port 465 (for SSL), or port 587 (for TLS).

Session length limits

Gmail POP sessions are limited to about 7 days. Gmail IMAP sessions are limited to about 24 hours. If the session was authenticated using OAuth credentials, it's limited to about the validity period of the access token used (usually 1 hour). A session in this context is one continuous TCP connection.

See Also
Redirecting

When the time elapses and the session expires, Gmail closes the connection with a message saying that the session expired. After that, the client can reconnect, authenticate again, and continue. If using OAuth, make sure that the access token used is valid (if you try to use an access token older than 1 hour, it might be invalid).

Libraries and Samples

Accessing mail using IMAP or POP and sending mail using SMTP is often done using existing IMAP and SMTP libraries for convenience. As long as these libraries support the Simple Authentication and Security Layer (SASL), they should be compatible with the SASL XOAUTH2 mechanism supported by Gmail.

In addition to the SASL XOAUTH2 protocol documentation, you may also want to read Using OAuth 2.0 to Access Google APIs for further information on implementing an OAuth 2.0 client.

The Libraries and Samples page provides code samples in a variety of popular languages using the SASL XOAUTH2 mechanism with either IMAP or SMTP.

IMAP, POP, and SMTP  |  Gmail  |  Google for Developers (2024)
Top Articles
What are the different types of cloud computing? | Google Cloud
How to Calculate the Intrinsic Value of a Company Like Warren Buffett | StableBread
Netronline Taxes
Ups Stores Near
Jeremy Corbell Twitter
Ingles Weekly Ad Lilburn Ga
Sissy Hypno Gif
Vanadium Conan Exiles
Uvalde Topic
Select Truck Greensboro
Craigslist Pets Southern Md
What is Cyber Big Game Hunting? - CrowdStrike
104 Whiley Road Lancaster Ohio
Convert 2024.33 Usd
Huntersville Town Billboards
Saritaprivate
Unforeseen Drama: The Tower of Terror’s Mysterious Closure at Walt Disney World
‘The Boogeyman’ Review: A Minor But Effectively Nerve-Jangling Stephen King Adaptation
Coomeet Premium Mod Apk For Pc
How to Make Ghee - How We Flourish
Kirk Franklin Mother Debra Jones Age
Inter Miami Vs Fc Dallas Total Sportek
Bidrl.com Visalia
Watson 853 White Oval
Jurassic World Exhibition Discount Code
Vht Shortener
TMO GRC Fortworth TX | T-Mobile Community
Generator Supercenter Heartland
Nurofen 400mg Tabletten (24 stuks) | De Online Drogist
91 Octane Gas Prices Near Me
Bratislava | Location, Map, History, Culture, & Facts
Scioto Post News
Cruise Ships Archives
Tamilyogi Ponniyin Selvan
Covalen hiring Ai Annotator - Dutch , Finnish, Japanese , Polish , Swedish in Dublin, County Dublin, Ireland | LinkedIn
Best Weapons For Psyker Darktide
Whitehall Preparatory And Fitness Academy Calendar
Skyrim:Elder Knowledge - The Unofficial Elder Scrolls Pages (UESP)
Bismarck Mandan Mugshots
Stafford Rotoworld
Koninklijk Theater Tuschinski
Express Employment Sign In
Vons Credit Union Routing Number
Directions To The Closest Auto Parts Store
The Conners Season 5 Wiki
Homeloanserv Account Login
Craigslist Com St Cloud Mn
Professors Helpers Abbreviation
Lux Funeral New Braunfels
Bunbrat
Guidance | GreenStar™ 3 2630 Display
login.microsoftonline.com Reviews | scam or legit check
Latest Posts
Article information

Author: Msgr. Refugio Daniel

Last Updated:

Views: 5759

Rating: 4.3 / 5 (74 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Msgr. Refugio Daniel

Birthday: 1999-09-15

Address: 8416 Beatty Center, Derekfort, VA 72092-0500

Phone: +6838967160603

Job: Mining Executive

Hobby: Woodworking, Knitting, Fishing, Coffee roasting, Kayaking, Horseback riding, Kite flying

Introduction: My name is Msgr. Refugio Daniel, I am a fine, precious, encouraging, calm, glamorous, vivacious, friendly person who loves writing and wants to share my knowledge and understanding with you.