{"id":350,"date":"2018-08-09T21:07:52","date_gmt":"2018-08-10T02:07:52","guid":{"rendered":"http:\/\/zewwy.ca\/?p=350"},"modified":"2018-09-21T18:29:51","modified_gmt":"2018-09-21T23:29:51","slug":"k2-smtp-configurations","status":"publish","type":"post","link":"https:\/\/zewwy.ca\/index.php\/2018\/08\/09\/k2-smtp-configurations\/","title":{"rendered":"K2 SMTP Configurations"},"content":{"rendered":"<h1 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Intro\"><\/span>Intro<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>I&#8217;m going to keep this post short, just in hopes that I don&#8217;t go off the rails on this product; K2 Blackpearl 4.7. I have plenty of awesome SharePoint 2010 to 2016 migration content yet to post on my site. I&#8217;m sorry I wish I could get all the awesome things I do on here, there are many awesome things I keep thinking about; iOmega NAS conversion I did replacing the ix12 OS with FreeNAS, My test enviroment, ISCSI MPIO (VMware, Microsoft, linux configs)&#8230; anyway&#8230; K2&#8230;. ugh<\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"The_Problem\"><\/span>The Problem<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>I&#8217;ve never posted about this product on my site before, cause to be frank&#8230;. I tried to stay away from it as much as possible, so all I did was update the base OS and pray that the developers or users didn&#8217;t complain about errors in any of the &#8220;K2 apps&#8221;. Trust me there are lots I can&#8217;t tell you how many times I had o hear about K2 issues&#8230; anyway, I digress. Ya&#8217;d figure it&#8217;s <a href=\"https:\/\/help.k2.com\/onlinehelp\/k2blackpearl\/icg\/4.7\/default.htm#Install\/Manual\/BP\/BP_Inst_SMTP.htm\">this simple<\/a> eh&#8230; well for running the setup manager, for first time config sure&#8230; but you have to run it again if you want to ever change this value&#8230; *ahem*&#8230; alright so lets say you did this&#8230; it&#8217;ll just work right&#8230; you set the email server destination and port, it&#8217;s gotta work for everything in the server (We&#8217;ere talking standalone, not clustered). right?&#8230;. Nope&#8230; So you eventually find that this is the most common, and generic error you will find if you ever have any email issues with K2&#8230; &#8220;There is no connection string for the destination email address &#8216;Email Address'&#8221; and you will get this for a lot of different things. Which oddly enough some of it gets covered <a href=\"https:\/\/community.k2.com\/t5\/K2-Five\/Workflow-Send-Email-There-is-no-connection-string-for-the\/td-p\/102993\">here<\/a>. But it&#8217;s a mess, and you have no clue which problem is the cause for the error. So much like the shared link there:<\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Check_1_%E2%80%93_Environment_Variables\"><\/span>Check 1 &#8211; Environment Variables<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Check the Environment Variables (If you are not sure what Environment Variables are you can read this *Ahem* Awesome&#8230; <a href=\"https:\/\/help.k2.com\/environmentlibrary_whitepaper.aspx\">WhitePaper)<\/a><\/p>\n<p>Alright&#8230; so we re-ran the config manager, updated the email settings there, updated out environment variables, we gotta be good now!&#8230;..<\/p>\n<p>&#8220;There is no connection string for the destination email address &#8216;Email Address'&#8221;<\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Check_2_%E2%80%93_SMTP_Config_Strings\"><\/span>Check 2 &#8211; SMTP Config Strings<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You got to be&#8230;&#8230; ok, ok&#8230;. we got this&#8230; there&#8217;s got to be something else we must have missed&#8230; let&#8217;s see&#8230; mhmmm as Mikhal says from here&#8230;<\/p>\n<p>&#8220;Email configuration is externalized from process and K2 server relies on connection strings in configuration file, processes look at Environment Library, but you should also keep in mind String Table. I saw cases when people did update of Mail Server field in environment library, but their workflow was deployed from other environment with old\/incorrect email settings which were written into String Table during deployment time &#8211; so you should also make sure that you have correct settings there.&#8221;<\/p>\n<p>soooo&#8230; From <a href=\"https:\/\/help.k2.com\/onlinehelp\/k2blackpearl\/icg\/4.7\/default.htm#Configure\/IntCon_SA_ManEmail.htm\">K2 terrible support page<\/a> you can either dig in and manually edit  &#8220;k2hostserver.exe.config&#8221; Really&#8230;.. really&#8230;.. .exe.config &#8230;.. anyway load the terrible Windows application that they use to edit this XML type config file. Now you mind find your self wondering &#8220;Do I have to create a new SMTP connection string for every from and destination address? That&#8217;s&#8230;. just&#8230;&#8230; unmanageable!&#8221; And yup it sort of is, what my awesome colleague and I discovered (He&#8217;s a K2 Master by the way) is that any internal &#8220;spoofed&#8221; mail (since we had decided we didn&#8217;t utilize any of K2&#8217;s EWS integration) would only work when we had that particular user with a SMTP string in this tool; ConnectionStringEditor.exe<\/p>\n<p>It took my colleague a really long time before magically discovering what the syntax was in the SMTP connection string to be a wild card E.G. *@Zewwy.ca &#8230;. Drum Roll&#8230;&#8230;.. NOTHING<\/p>\n<p>That&#8217;s right nothing to make a wildcard SMTP connection string simply leave the field blank in the first step of the wizard. Alright&#8230; so now we had validated workflows could send on behalf of over SMTP based email (even to exchange without any EWS integration)&#8230; However we also utilized another workflow to send external email address emails&#8230;<\/p>\n<p>&#8220;There is no connection string for the destination email address &#8216;Email Address'&#8221;<\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Check_3_%E2%80%93_SMTP_Receive_Connector\"><\/span>Check 3 &#8211; SMTP Receive Connector<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Are you Kidding ME?!?!?! Alright&#8230;. Jesus what else did I forget\/miss&#8230;<\/p>\n<p>At this point you may find yourself a lil bit stuck as every other post points you to the same solutions above, or like <a href=\"https:\/\/k2shared.wordpress.com\/2015\/08\/14\/adding-an-smtp-server-to-send-an-email-through-k2-blackpearl\/\">this jerk-off<\/a> goes over everything, then laughs in your face and says &#8220;\u2018There is no connection string for the destination email address testsmtp4velocity@gmail.com\u2019. That is a pity. I thought we just added it. Ok, I admit, I knew this was going to be the result, but I thought I\u2019d keep you intrigued. Now you will have to wait for my next article to see how to fix it. You can find the answer in part 2 of this article, along with a few other tips on how to resolve some other issues when trying to send an email through a SMTP server.&#8221; only to find that there is no Part 2&#8230;.<\/p>\n<p>So I was kind of stuck with the initial share I gave&#8230;<\/p>\n<p>&#8220;Thanks for your help. We found the root reason is that the Exchange Server config the receive policy so we changed the policy then resolved the problem.&#8221;<\/p>\n<p>If dealing with issues isn&#8217;t bad enough the internet is littered with useless help. &#8220;Don&#8217;t worry guys, I figured out my problem, if you have this problem too, well I figured out mine, good luck with yours.&#8221; Anyway, again I digress and I am not such a jerk and I will tell you how I finally managed to resolve this issue for good.<\/p>\n<p>So I double checked my receive connector on my Exchange server&#8230; may there&#8217;s just something I missed&#8230; well&#8230; I covered everything, No TLS&#8230;. using Port 25, listening from only my K2 Server, Anonymous Users Checked off under security&#8230;  What the heck I have them all covered&#8230;<\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Check_4_%E2%80%93_Part_2\"><\/span>Check 4 &#8211; Part 2<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>I was at my wits end until <a href=\"http:\/\/zewwy.ca\/index.php\/2018\/08\/09\/configuring-an-anonymous-receive-connector-on-exchange-2016\/#Part_2_The_Solution\">this<\/a>! (Part 2 LOLOLOLOL, for real though&#8230; it&#8217;s coming soon. in like 20-30 mins, maybe an hour shouldn&#8217;t take me long to write up)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Intro I&#8217;m going to keep this post short, just in hopes that I don&#8217;t go off the rails on this product; K2 Blackpearl 4.7. I have plenty of awesome SharePoint 2010 to 2016 migration content yet to post on my site. I&#8217;m sorry I wish I could get all the awesome things I do on &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/zewwy.ca\/index.php\/2018\/08\/09\/k2-smtp-configurations\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;K2 SMTP Configurations&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","footnotes":""},"categories":[8],"tags":[60,44],"class_list":["post-350","post","type-post","status-publish","format-standard","hentry","category-server-administration","tag-k2","tag-smtp"],"_links":{"self":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/comments?post=350"}],"version-history":[{"count":8,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/350\/revisions"}],"predecessor-version":[{"id":360,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/350\/revisions\/360"}],"wp:attachment":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/media?parent=350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/categories?post=350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/tags?post=350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}