{"id":3658,"date":"2012-12-14T18:39:15","date_gmt":"2012-12-14T16:39:15","guid":{"rendered":"http:\/\/www.limilabs.com\/blog\/?p=3658"},"modified":"2018-02-26T14:22:01","modified_gmt":"2018-02-26T12:22:01","slug":"gmail-imap-pop3-smtp-settings","status":"publish","type":"post","link":"https:\/\/www.limilabs.com\/blog\/gmail-imap-pop3-smtp-settings","title":{"rendered":"Gmail: IMAP, POP3, and SMTP settings"},"content":{"rendered":"<p>Gmail supports access via IMAP, POP3 and SMTP protocols. Below you can find the configuration settings for all protocols.<\/p>\n<div class=\"well\">\nRemember that you must <a href=\"\/blog\/enable-imap-in-gmail\">enable IMAP in Gmail<\/a> or <a href=\"\/blog\/enable-pop3-in-gmail\">enable POP3 in Gmail<\/a> first.\n<\/div>\n<p>All Gmail servers (IMAP, POP3 and SMTP) use implicit SSL\/TLS &#8211; use <em>ConnectSSL<\/em> method. SMTP additionally supports explicit SSL\/TLS (you can use Connect method and then secure the channel using StartTLS .<\/p>\n<h2>IMAP<\/h2>\n<p>Server: <strong>imap.gmail.com<\/strong><br \/>\nSSL: <strong>true-implicit<\/strong><br \/>\nPort: <strong>993<\/strong> (default)<br \/>\nUser: pat@gmail.com or pat@your-domain.com<\/p>\n<h2>POP3<\/h2>\n<p>Server: <strong>pop.gmail.com<\/strong><br \/>\nSSL: <strong>true-implicit<\/strong><br \/>\nPort: <strong>995 <\/strong>(default)<br \/>\nUser: pat@gmail.com or pat@your-domain.com<\/p>\n<h2>SMTP<\/h2>\n<p>Server: <strong>smtp.gmail.com<\/strong><br \/>\nSSL: <strong>true-implicit<\/strong> \/ true-explicit<br \/>\nPort: <strong>465 <\/strong>(default) \/ 587 (default)<br \/>\nUser: pat@gmail.com or pat@your-domain.com<\/p>\n<p>Following are the code samples for Mail.dll <a href=\"\/mail\">.NET IMAP, POP3 and SMTP component<\/a>.<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n\/\/ C#\r\n\r\nusing (Imap client = new Imap())\r\n{\r\n    client.ConnectSSL(&quot;imap.gmail.com&quot;);\r\n    client.UseBestLogin(&quot;pat@gmail.com&quot;, &quot;password&quot;);\r\n    ...\r\n}\r\n\r\nusing (Pop3 client = new Pop3())\r\n{\r\n    client.ConnectSSL(&quot;pop.gmail.com&quot;);\r\n    client.UseBestLogin(&quot;pat@gmail.com&quot;, &quot;password&quot;);\r\n    ...\r\n}\r\n\r\nusing (Smtp client = new Smtp ())\r\n{\r\n    client.ConnectSSL(&quot;smtp.gmail.com&quot;);\r\n    client.UseBestLogin(&quot;pat@gmail.com&quot;, &quot;password&quot;);\r\n    ...\r\n}\r\n<\/pre>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n' VB.NET\r\n\r\nUsing client As New Imap()\r\n\tclient.ConnectSSL(&quot;imap.gmail.com&quot;)\r\n\tclient.UseBestLogin(&quot;pat@gmail.com&quot;, &quot;password&quot;)\r\n\t...\r\nEnd Using\r\n\r\nUsing client As New Pop3()\r\n\tclient.ConnectSSL(&quot;pop.gmail.com&quot;)\t\t\r\n\tclient.UseBestLogin(&quot;pat@gmail.com&quot;, &quot;password&quot;)\r\n\t...\r\nEnd Using\r\n\r\nUsing client As New Smtp()\r\n\tclient.ConnectSSL(&quot;smtp.gmail.com&quot;)\r\n\tclient.UseBestLogin(&quot;pat@gmail.com&quot;, &quot;password&quot;)\r\n\t...\r\nEnd Using\r\n<\/pre>\n<p>How to <a href=\"\/blog\/download-emails-from-gmail\">download emails from Gmail<\/a>.<\/p>\n<p>You can find more samples in each section:<\/p>\n<ul>\n<li><a href=\"\/mail\/samples#imap-gmail\">Using Gmail over IMAP<\/a><\/li>\n<li><a href=\"\/mail\/samples#imap-gmail-oauth2\">Using Gmail over IMAP and OAuth 2.0<\/a><\/li>\n<li><a href=\"\/mail\/samples#imap-gmail-oauth\">Using Gmail over IMAP and OAuth<\/a><\/li>\n<li><a href=\"\/mail\/samples#pop3-gmail\">Using Gmail over POP3<\/a><\/li>\n<ul>\n","protected":false},"excerpt":{"rendered":"<p>Gmail supports access via IMAP, POP3 and SMTP protocols. Below you can find the configuration settings for all protocols. Remember that you must enable IMAP in Gmail or enable POP3 in Gmail first. All Gmail servers (IMAP, POP3 and SMTP) use implicit SSL\/TLS &#8211; use ConnectSSL method. SMTP additionally supports explicit SSL\/TLS (you can use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[15,25,28,42,90,50,57],"class_list":["post-3658","post","type-post","status-publish","format-standard","hentry","category-mail-dll","tag-c","tag-gmail","tag-imap","tag-pop3","tag-settings","tag-smtp","tag-vb-net"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/3658"}],"collection":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/comments?post=3658"}],"version-history":[{"count":29,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/3658\/revisions"}],"predecessor-version":[{"id":5429,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/3658\/revisions\/5429"}],"wp:attachment":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/media?parent=3658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/categories?post=3658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/tags?post=3658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}