{"id":1445,"date":"2022-02-07T15:10:27","date_gmt":"2022-02-07T15:10:27","guid":{"rendered":"https:\/\/datarebus.com\/?p=1445"},"modified":"2022-02-07T15:10:27","modified_gmt":"2022-02-07T15:10:27","slug":"sql-server-2016-database-mail-cannot-send-email-smtp-office365-com","status":"publish","type":"post","link":"https:\/\/datarebus.com\/index.php\/2022\/02\/07\/sql-server-2016-database-mail-cannot-send-email-smtp-office365-com\/","title":{"rendered":"SQL Server 2016 Database Mail cannot send email smtp.office365.com"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"610\" height=\"404\" src=\"https:\/\/datarebus.com\/wp-content\/uploads\/2022\/02\/image-2.png\" alt=\"\" class=\"wp-image-1449\" srcset=\"https:\/\/datarebus.com\/wp-content\/uploads\/2022\/02\/image-2.png 610w, https:\/\/datarebus.com\/wp-content\/uploads\/2022\/02\/image-2-300x199.png 300w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/figure>\n\n\n\n<ol type=\"1\"><li>Define your SQL Email Configuration<\/li><li>Write \u201csmtp.office365.com\u201d as server name<\/li><li>Port should be 587 if not told otherwise<\/li><li>Basic authentication with email and password is better<\/li><li>SSL check box is a MUST \u00a0<\/li><\/ol>\n\n\n\n<h2 id=\"but-if-you-still-have-problem-on-sending-email\">But if you still have problem on sending email:<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong>ADD TLS 1.2 KEYS TO YOUR REGISTERY (requires restart)<\/strong><\/p><\/blockquote>\n\n\n\n<div class=\"wp-container-1 wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<ul><li><em>Below is the content for a simple executable registry file that I put together that will make the 2 new settings and the settings already shown on the thread above (i.e. this makes all of the necessary Registry settings*):<br>Windows Registry Editor Version 5.00<br>[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft.NETFramework\\v4.0.30319]<br>&#8220;SchUseStrongCrypto&#8221;=dword:00000001<\/em><\/li><li><em>[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft.NETFramework\\v4.0.30319]<br>&#8220;SchUseStrongCrypto&#8221;=dword:00000001<\/em><\/li><li><em>[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL\\Protocols\\TLS 1.2]<\/em><\/li><li><em>[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL\\Protocols\\TLS 1.2\\Client]<br>&#8220;DisabledByDefault&#8221;=dword:00000000<br>&#8220;Enabled&#8221;=dword:00000001<\/em><\/li><li><em>[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL\\Protocols\\TLS 1.2\\Server]<br>&#8220;DisabledByDefault&#8221;=dword:00000000<br>&#8220;Enabled&#8221;=dword:00000001<br>Note 1: SQL needs to be restarted for these settings to take affect but it is better to restart Windows since the new settings will affect .NET 4.x generally.<\/em><\/li><li><em>Note 2: In SQL, the SSL-checkbox must be ticked in the mail profile to use TLS1.2.<\/em><\/li><\/ul>\n<\/div><\/div>\n\n\n\n<h2><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h2 id=\"still-have-problem-on-sending\">Still Have Problem on sending?<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"603\" height=\"341\" src=\"https:\/\/datarebus.com\/wp-content\/uploads\/2022\/02\/image-3.png\" alt=\"\" class=\"wp-image-1450\" srcset=\"https:\/\/datarebus.com\/wp-content\/uploads\/2022\/02\/image-3.png 603w, https:\/\/datarebus.com\/wp-content\/uploads\/2022\/02\/image-3-300x170.png 300w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Define your SQL Email Configuration Write \u201csmtp.office365.com\u201d as server name Port should be 587 if not told otherwise Basic authentication with email and password is better SSL check box is a MUST \u00a0 But if you still have problem on sending email: ADD TLS 1.2 KEYS TO YOUR REGISTERY (requires restart) Below is the content [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1449,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,16],"tags":[24,27,26,23,22,25],"_links":{"self":[{"href":"https:\/\/datarebus.com\/index.php\/wp-json\/wp\/v2\/posts\/1445"}],"collection":[{"href":"https:\/\/datarebus.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/datarebus.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/datarebus.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/datarebus.com\/index.php\/wp-json\/wp\/v2\/comments?post=1445"}],"version-history":[{"count":1,"href":"https:\/\/datarebus.com\/index.php\/wp-json\/wp\/v2\/posts\/1445\/revisions"}],"predecessor-version":[{"id":1451,"href":"https:\/\/datarebus.com\/index.php\/wp-json\/wp\/v2\/posts\/1445\/revisions\/1451"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/datarebus.com\/index.php\/wp-json\/wp\/v2\/media\/1449"}],"wp:attachment":[{"href":"https:\/\/datarebus.com\/index.php\/wp-json\/wp\/v2\/media?parent=1445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/datarebus.com\/index.php\/wp-json\/wp\/v2\/categories?post=1445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/datarebus.com\/index.php\/wp-json\/wp\/v2\/tags?post=1445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}