{"id":10085,"date":"2019-04-26T21:37:10","date_gmt":"2019-04-26T12:37:10","guid":{"rendered":"https:\/\/elleneast.com\/?p=10085"},"modified":"2019-05-17T20:21:46","modified_gmt":"2019-05-17T11:21:46","slug":"%e3%80%90vb-net%e3%80%91system-net-mail-smtpclient-%e3%81%af%e4%bd%bf%e3%81%86%e3%81%aa%ef%bc%81-mailkit-%e3%82%92%e4%bd%bf%e3%81%88%ef%bc%81","status":"publish","type":"post","link":"https:\/\/elleneast.com\/?p=10085","title":{"rendered":"\u3010VB.NET\u3011System.Net.Mail \u306e SmtpClient \u306f\u4f7f\u3046\u306a\uff01 MailKit \u3092\u4f7f\u3048\uff01"},"content":{"rendered":"<p>\u3072\u3055\u3057\u3076\u308a\u306b\u30e1\u30fc\u30eb\u9001\u4fe1\u3092\u884c\u3046\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u601d\u3063\u305f\u3093\u30c7\u30b9\u3002<\/p>\n<p>\u904e\u53bb\u306b\u4f5c\u3063\u305f\u30e1\u30fc\u30eb\u9001\u4fe1\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u307b\u3058\u304f\u308a\u8fd4\u3057\u3066\u30b3\u30fc\u30c9\u3092\u6d41\u7528\u3057\u3088\u3046\u304b\u306a\uff5e\u3068\u3082\u601d\u3063\u305f\u3051\u308c\u3069\u30fb\u30fb\u30fb\u307b\u3089\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u4e16\u754c\u306f\u5909\u5316\u304c\u6fc0\u3057\u3044\u304b\u3089\u306d\uff01 \u3088\u308a\u826f\u3044\u65b9\u6cd5\u304c\u6b21\u3005\u306b\u73fe\u308c\u3066\u3084\u308a\u65b9\u304c\u5909\u308f\u3063\u305f\u308a\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u304b\u3089\u3002\u5ff5\u306e\u305f\u3081\u30e1\u30fc\u30eb\u9001\u4fe1\u306e\u65b9\u6cd5\u306b\u3064\u3044\u3066\u30cd\u30c3\u30c8\u691c\u7d22\u3057\u3066\u307f\u305f\u308f\u3051\u3067\u3059\u3002\u4ee5\u524d\u3068\u9055\u3046\u65b0\u3057\u3044\u65b9\u6cd5\u304c\u51fa\u3066\u304d\u305f\u308a\u3057\u3066\u306a\u3044\u3067\u3057\u3087\u3046\u306d\uff5e\u3068\u30fb\u30fb\u30fb\u3002<\/p>\n<p>\u305d\u3057\u305f\u3089\u305d\u306e\u4e88\u611f\u304c\u7684\u4e2d\u3002\u682a\u3084\u3063\u3066\u3082\u5b9d\u304f\u3058\u8cb7\u3063\u3066\u3082\u3001\u307f\u3054\u3068\u306b\u30cf\u30ba\u30ec\u307e\u304f\u308a\u306a\u81ea\u5206\u306a\u306e\u306b\u3001\u5909\u306a\u3068\u3053\u308d\u3067\u7684\u4e2d\u904b\u3092\u4f7f\u3063\u3061\u3083\u3046\u3093\u3060\u3088\u306a\u30fc\u3002<\/p>\n<p>\u7121\u99c4\u8a71\u306f\u3053\u306e\u3078\u3093\u306b\u3057\u3066\u672c\u984c\u3078\uff01<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u76ee\u6b21<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/elleneast.com\/?p=10085\/#NET_45_%E4%BB%A5%E9%99%8D%E3%81%AA%E3%82%89_SystemNetMailSmtpClient_%E3%81%AF%E4%BD%BF%E3%81%86%E3%81%AA%EF%BC%81_MailKit_%E3%82%92%E4%BD%BF%E3%81%88%EF%BC%81\" >.NET 4.5 \u4ee5\u964d\u306a\u3089 System.Net.Mail.SmtpClient \u306f\u4f7f\u3046\u306a\uff01&nbsp;MailKit \u3092\u4f7f\u3048\uff01<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/elleneast.com\/?p=10085\/#MailKit_%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" >MailKit \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/elleneast.com\/?p=10085\/#MailKit_%E3%81%AB%E3%82%88%E3%82%8B%E3%83%A1%E3%83%BC%E3%83%AB%E9%80%81%E4%BF%A1%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89\" >MailKit \u306b\u3088\u308b\u30e1\u30fc\u30eb\u9001\u4fe1\u306e\u30b3\u30fc\u30c9<\/a><\/li><\/ul><\/nav><\/div>\n<h2 id=\"i-0\"><span class=\"ez-toc-section\" id=\"NET_45_%E4%BB%A5%E9%99%8D%E3%81%AA%E3%82%89_SystemNetMailSmtpClient_%E3%81%AF%E4%BD%BF%E3%81%86%E3%81%AA%EF%BC%81_MailKit_%E3%82%92%E4%BD%BF%E3%81%88%EF%BC%81\"><\/span>.NET 4.5 \u4ee5\u964d\u306a\u3089 System.Net.Mail.SmtpClient \u306f\u4f7f\u3046\u306a\uff01&nbsp;MailKit \u3092\u4f7f\u3048\uff01<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u73fe\u5728\u3001Microsoft \u306e <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/system.net.mail.smtpclient\" target=\"_blank\" rel=\"noopener noreferrer\">System.Net.Mail.SmtpClient<\/a> \u306e\u8a18\u4e8b\u3092\u958b\u304f\u3068\u3001\u6b21\u306e\u3088\u3046\u306b\u30cf\u30c3\u30ad\u30ea\u3068\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote class=\"quote_silver\">\n<p>Warning<br \/>\nThis API is now obsolete.<\/p>\n<p>\u8b66\u544a<br \/>\n\u3053\u308c\u306f\u53e4\u3044\uff08\u5ec3\u6b62\u4e88\u5b9a\u306e\uff09API \u3067\u3059\u3002<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<blockquote class=\"quote_silver\">\n<p>we strongly recommend you use https:\/\/github.com\/jstedfast\/MailKit and https:\/\/github.com\/jstedfast\/MimeKit instead<\/p>\n<p>\u304b\u308f\u308a\u306b MailKit \u3068 MimeKit \u306e\u4f7f\u7528\u3092\u5f37\u304f\u304a\u52e7\u3081\u3057\u307e\u3059<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<blockquote class=\"quote_silver\">\n<p>Important<br \/>\nWe don\u2019t recommend that you use the&nbsp;SmtpClient&nbsp;class for new development. For more information, see&nbsp;<a href=\"https:\/\/github.com\/dotnet\/platform-compat\/blob\/master\/docs\/DE0005.md\" target=\"_blank\" rel=\"noopener noreferrer\">SmtpClient shouldn\u2019t be used<\/a>&nbsp;on GitHub.<\/p>\n<p>\u91cd\u8981<br \/>\n\u65b0\u3057\u3044\u958b\u767a\u3067 SmtpClient \u306e\u4f7f\u7528\u306f\u304a\u3059\u3059\u3081\u3057\u307e\u305b\u3093\u3002\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f GitHub \u306e\u300c<a href=\"https:\/\/github.com\/dotnet\/platform-compat\/blob\/master\/docs\/DE0005.md\" target=\"_blank\" rel=\"noopener noreferrer\">SmtpClient \u3092\u4f7f\u7528\u3059\u3079\u304d\u3067\u306f\u306a\u3044<\/a>\u300d\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p>\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u305f\u3081\u306b .NET Framework 2.0\uff082005\/11\uff5e\uff09\u304b\u3089\u9577\u3044\u9593\u4f7f\u308f\u308c\u3066\u304d\u305f System.Net.Mail.SmtpClient \u3067\u3059\u304c\u30012017 \u5e74\u306e 4 \u6708\u9803\u306b\u306f SmtpClient \u30af\u30e9\u30b9\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b obsolete\uff08\u53e4\u3044\u3001\u5ec3\u6b62\u4e88\u5b9a\uff09\u3068\u66f8\u304b\u308c\u3066\u3044\u305f\u3088\u3046\u3067\u3059\uff08<a href=\"https:\/\/www.infoq.com\/news\/2017\/04\/MailKit-MimeKit-Official\" target=\"_blank\" rel=\"noopener noreferrer\">\u539f\u6587<\/a>\uff09\u3002\u8a2d\u8a08\u304c\u8ca7\u5f31\u3067\u554f\u984c\u304c\u3042\u308b\u3093\u3060\u3068\u304b\u3002<\/p>\n<p>MailKit \u304c .NET Framework 4.5 \u304b\u3089\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u3089\u3057\u3044\u306e\u3067\u3001.NET Framework 4.5 \u4ee5\u4e0a\u3092\u4f7f\u7528\u3059\u308b\u30a2\u30d7\u30ea\u306a\u3089\u3070\u3001MailKit \u3092\u4f7f\u3046\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2 id=\"i-1\"><span class=\"ez-toc-section\" id=\"MailKit_%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>MailKit \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>NuGet \u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002NuGet \u304b\u3089 MailKit \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068 MimeKit \u3082\u304f\u3063\u3064\u3044\u3066\u304f\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>Visual Studio \u306e\uff3b\u30c4\u30fc\u30eb\uff3d\uff1e\uff3bNuGet \u30d1\u30c3\u30b1\u30fc\u30b8 \u30de\u30cd\u30fc\u30b8\u30e3\u30fc\uff3d\uff1e\uff3b\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306e NuGet \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u7ba1\u7406\uff3d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10099 bigshadow\" src=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_01.png\" alt=\"\" width=\"709\" height=\"281\" srcset=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_01.png 709w, https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_01-300x119.png 300w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\"><\/a><\/p>\n<p>\u5de6\u4e0a\u306e\uff3b\u53c2\u7167\uff3d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u691c\u7d22\u30dc\u30c3\u30af\u30b9\u306b\u300cMailKit\u300d\u3068\u5165\u529b\u3002\u53f3\u5074\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5bfe\u8c61\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u3066\u3001\u53f3\u4e0b\u306e\uff3b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff3d\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><a href=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_02.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10100 bigshadow\" src=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_02.png\" alt=\"\" width=\"735\" height=\"534\" srcset=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_02.png 735w, https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_02-300x218.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\"><\/a><\/p>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306a\u78ba\u8a8d\u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\uff3bOK\uff3d\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u958b\u59cb\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10101 bigshadow\" src=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_03.png\" alt=\"\" width=\"486\" height=\"493\" srcset=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_03.png 486w, https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_03-296x300.png 296w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\"><\/a><\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u72b6\u614b\u3092\u793a\u3059\u51fa\u529b\u30a6\u30a3\u30f3\u30c9\u30a6\u306f\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<p><a href=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10102 bigshadow\" src=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_04.png\" alt=\"\" width=\"657\" height=\"224\" srcset=\"https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_04.png 657w, https:\/\/elleneast.com\/wp\/wp-content\/uploads\/programming_topics\/MailKit\/MailKit_04-300x102.png 300w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\"><\/a><\/p>\n<\/p>\n<div class=\"memo \">\n<div class=\"memo_ttl dfont\"> MEMO<\/div>\n<p>MailKit \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001\u901a\u5e38\u306f MimeKit \u3082\u4e00\u7dd2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u3057\u304b\u3057\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u4e00\u7dd2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u306a\u3044\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001\u305d\u306e\u3068\u304d\u306f\u524d\u8ff0\u306e\u624b\u9806\u3067\u500b\u5225\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001\u79c1\u304c MailKit \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u4e00\u5f0f\u3092\u5225\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306b\u30b3\u30d4\u30fc\u3057\u305f\u3068\u304d\u3001MailKit \u306e\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3082 MimeKit \u304c\u4e00\u7dd2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u306a\u304b\u3063\u305f\u306e\u3067\uff08\u30b3\u30fc\u30c9\u306b\u767a\u751f\u3057\u305f\u30a8\u30e9\u30fc\u3067\u6c17\u4ed8\u3044\u305f\uff09\u3001\u5225\u9014\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<\/p>\n<\/div>\n<h2 id=\"i-2\"><span class=\"ez-toc-section\" id=\"MailKit_%E3%81%AB%E3%82%88%E3%82%8B%E3%83%A1%E3%83%BC%E3%83%AB%E9%80%81%E4%BF%A1%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89\"><\/span>MailKit \u306b\u3088\u308b\u30e1\u30fc\u30eb\u9001\u4fe1\u306e\u30b3\u30fc\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3059\u3002\u96e3\u3057\u304f\u306a\u3044\u3067\u3059\u306d\u3002\u95a2\u6570\u306e\u982d\u306b Async \u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3002<\/p>\n<pre class=\"lang:vbnet decode:true\">Async Sub SendMail\n\n  '\u30e1\u30fc\u30eb\u30bf\u30a4\u30c8\u30eb\n  Dim Subject As String = \"\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb\"\n  '\u30e1\u30fc\u30eb\u672c\u6587\n  Dim BodyText As String = \"\u3053\u3093\u306b\u3061\u306f\u3002(*^\u25bd^*)\" &amp; vbCrLf &amp; vbCrLf &amp; \"\u304a\u5143\u6c17\u3067\u3059\u304b\uff1f\"\n  '\u9001\u4fe1\u8005\u306e\u540d\u524d\n  Dim From_Name As String = \"From Ellen East\"\n  '\u9001\u4fe1\u8005\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\n  Dim From_Address As String = \"FromMailAddress.com\"\n  '\u5b9b\u5148\u306e\u540d\u524d\n  Dim To_Name As String = \"To Ellen East\"\n  '\u5b9b\u5148\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\n  Dim To_Address As String = \"ToMailAddress.com\"\n  'SMTP \u30b5\u30fc\u30d0\u30fc\n  Dim SmtpServer As String = \"SmtpServer.jp\"\n  '\u30dd\u30fc\u30c8\n  Dim Port As UInteger = 25\n  '\u30b5\u30fc\u30d0\u30fc\u8a8d\u8a3c\u30e6\u30fc\u30b6\u30fc\u540d\n  Dim Auth_Username As String = \"Username\"\n  '\u30b5\u30fc\u30d0\u30fc\u8a8d\u8a3c\u30d1\u30b9\u30ef\u30fc\u30c9\n  Dim Auth_Password As String = \"Password\"\n\n  Dim oMsg = New MimeKit.MimeMessage\n  '\u9001\u4fe1\u8005\n  oMsg.From.Add(New MimeKit.MailboxAddress(From_Name, From_Address))\n  '\u5b9b\u5148  \u5fc5\u8981\u306b\u5fdc\u3058\u3066 message.Cc.Add\u3001message.Bcc.Add\n  oMsg.To.Add(New MimeKit.MailboxAddress(To_Name, To_Address))\n  '\u30bf\u30a4\u30c8\u30eb\n  oMsg.Subject = Subject\n  '\u672c\u6587\n  Dim oTextPart = New MimeKit.TextPart(MimeKit.Text.TextFormat.Text)\n  oTextPart.Text = BodyText\n  oMsg.Body = oTextPart\n\n  Using oClient = New MailKit.Net.Smtp.SmtpClient()\n      Try\n          Await oClient.ConnectAsync(SmtpServer, Port) '\u63a5\u7d9a\n          Await oClient.AuthenticateAsync(Auth_Username, Auth_Password) '\u8a8d\u8a3c\n          Await oClient.SendAsync(oMsg) '\u9001\u4fe1\n          Await oClient.DisconnectAsync(True) '\u5207\u65ad\n      Catch ex As Exception\n          Throw New Exception(ex.Message &amp; vbCrLf &amp; vbCrLf &amp; \"\u30e1\u30fc\u30eb\u306e\u9001\u4fe1\u304c\u5931\u6557\u3057\u307e\u3057\u305f\u3002\")\n      End Try\n  End Using\n\nEnd Sub<\/pre>\n<p>Yahoo \u3068 XSERVER \u306e SMTP \u30b5\u30fc\u30d0\u30fc\u306b\u9001\u4fe1\u3057\u3066\u52d5\u4f5c\u78ba\u8a8d\u3057\u307e\u3057\u305f\u304c\u3001\u554f\u984c\u306a\u304f\u52d5\u4f5c\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u53c2\u8003\u306b\u3057\u305f\u8a18\u4e8b\uff1a<a href=\"https:\/\/www.atmarkit.co.jp\/ait\/articles\/1811\/21\/news023.html\" target=\"_blank\" rel=\"noopener noreferrer\">\u96fb\u5b50\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u306b\u306f\uff1f\uff08MailKit\u7de8\uff09\uff3b.NET 4.5\u3001C#\uff0fVB\uff3d<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3072\u3055\u3057\u3076\u308a\u306b\u30e1\u30fc\u30eb\u9001\u4fe1\u3092\u884c\u3046\u30c4\u30fc\u30eb\u3092\u4f5c\u308d\u3046\u3068\u601d\u3063\u305f\u3093\u30c7\u30b9\u3002 \u904e\u53bb\u306b\u4f5c\u3063\u305f\u30e1\u30fc\u30eb\u9001\u4fe1\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u307b\u3058\u304f\u308a\u8fd4\u3057\u3066\u30b3\u30fc\u30c9\u3092\u6d41\u7528\u3057\u3088\u3046\u304b\u306a\uff5e\u3068\u3082\u601d\u3063\u305f\u3051\u308c\u3069\u30fb\u30fb\u30fb\u307b\u3089\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u4e16\u754c\u306f\u5909\u5316\u304c\u6fc0\u3057\u3044\u304b\u3089\u306d\uff01 \u3088\u308a\u826f\u3044\u65b9\u6cd5\u304c &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2656,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[57],"tags":[60],"class_list":{"0":"post-10085","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-57","8":"tag-vb-net"},"_links":{"self":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/10085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10085"}],"version-history":[{"count":3,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/10085\/revisions"}],"predecessor-version":[{"id":10643,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/10085\/revisions\/10643"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/media\/2656"}],"wp:attachment":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}