{"id":5426,"date":"2021-12-08T08:48:31","date_gmt":"2021-12-08T08:48:31","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=5426"},"modified":"2022-12-01T23:38:46","modified_gmt":"2022-12-01T23:38:46","slug":"send-email-with-smtp-authentication-and-tls-with-vbs-cdo","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/send-email-with-smtp-authentication-and-tls-with-vbs-cdo","title":{"rendered":"Send Email with SMTP Authentication and TLS with VBS CDO"},"content":{"rendered":"<div class=\"wp-block-wab-pastacode\">\n\t<div class=\"code-embed-wrapper\"> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">\u2018 Email is delivered for the following recipients when some codes or types are missing<br\/>strMailTo=&quot;test@test.com&quot;<br\/>\u2019 ccc<br\/>strMailCc=&quot;test@test.com&quot;<br\/><br\/>  \tSet oMsg = CreateObject(&quot;CDO.Message&quot;)<br\/>  \tSet oConf = CreateObject(&quot;CDO.Configuration&quot;)<br\/>  \tSet oFlds = oConf.Fields<br\/>  \tWith oFlds<br\/>    \t\t.Item(&quot;http:\/\/schemas.microsoft.com\/cdo\/configuration\/sendusing&quot;) = 2<br\/>    \t\t.Item(&quot;http:\/\/schemas.microsoft.com\/cdo\/configuration\/smtpserver&quot;) = &quot;au-smtp-outbound-1.mimecast.com&quot;<br\/>    \t\t.Item(&quot;http:\/\/schemas.microsoft.com\/cdo\/configuration\/smtpserverport&quot;) = 587<br\/>\t\t\t.Item(&quot;http:\/\/schemas.microsoft.com\/cdo\/configuration\/smtpauthenticate&quot;) = 1<br\/>            .Item(&quot;http:\/\/schemas.microsoft.com\/cdo\/configuration\/sendusername&quot;) = &quot;smtpusername@domain.com&quot;<br\/>            .Item(&quot;http:\/\/schemas.microsoft.com\/cdo\/configuration\/sendpassword&quot;) = &quot;xxxxxx&quot;<br\/>\t\t\t.Item(&quot;http:\/\/schemas.microsoft.com\/cdo\/configuration\/sendtls&quot;).Value = True<br\/><br\/>    \t\t.Update<br\/>  \tEnd With<br\/><br\/>\tWith oMsg<br\/>    \t\tSet .Configuration = oConf<br\/>    \t\t.From = &quot;smtpusername@domain.com&quot;<br\/>    \t\t.To = strMailTo<br\/>    \t\t.Cc = strMailCc<br\/>    \t\t.Subject = &quot;Subbect&quot;<br\/>    \t\t.TextBody = &quot;Test&quot;<br\/>     \t\t.AddAttachment msecpath<br\/>    \t\t.Send<br\/>\tEnd With<br\/>\tSet oMsg = Nothing<br\/>\tSet oConf = Nothing<br\/>\tSet oFlds = Nothing<\/code><\/pre> <div class=\"code-embed-infos\"> <\/div> <\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3552,3670,3669,3668,1176,2350,3667],"class_list":["post-5426","post","type-post","status-publish","format-standard","hentry","category-research","tag-auto","tag-cdo","tag-schemas-microsoft-com","tag-schemas-microsoft-com-cdo-configuration","tag-smtp","tag-tls","tag-vbs-cdo"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=5426"}],"version-history":[{"count":4,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5426\/revisions"}],"predecessor-version":[{"id":6432,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5426\/revisions\/6432"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=5426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=5426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=5426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}