{"id":16,"date":"2011-02-02T20:19:32","date_gmt":"2011-02-02T20:19:32","guid":{"rendered":"http:\/\/62.131.51.129\/wordpress\/?p=16"},"modified":"2011-02-02T20:19:32","modified_gmt":"2011-02-02T20:19:32","slug":"send-mail-via-telnet","status":"publish","type":"post","link":"http:\/\/archief.van-maanen.com\/?p=16","title":{"rendered":"send mail via telnet"},"content":{"rendered":"<p>I am subscribed to a ADSL provider who also provides Email services. Hence, I could try to send some mail from the command line on my laptop.<\/p>\n<p>As a first step, I started a telnet session with the provider: from the command line I gave the command: &#8220;telnet\u00a0mail.wxs.nl 25&#8221;. The server responded promptly. As response I received: &#8220;220 CPSMTPM-CMT103.kpnxchange.com kpnxchange.com Fri, 24 Dec 2010 00:03:22 +0100&#8221;.<\/p>\n<p>My next command was &#8220;helo mail.wxs.nl&#8221; to contact the mail server. The reply from the mail server was: &#8220;250 CPSMTPM-CMT101.kpnxchange.com Hello [77.164.145.154]&#8221;.<\/p>\n<p>As sender, I introduced: &#8220;mail from: tom.vanmaanen@wxs.nl&#8221;. Apparently I was accepted as a legal sender as the server replied: &#8220;250 2.1.0 tom.vanmaanen@wxs.nl&#8230;.Sender OK&#8221;.<\/p>\n<p>I decided to send a mail to my-self: &#8220;rcpt to: tom.vanmaanen@wxs.nl&#8221;.<\/p>\n<p>To start the email, I had to issue the command &#8220;data&#8221;, upon which the server asked me to start the mail content: &#8220;354 Please start mail input.&#8221;.<\/p>\n<p>The mail content started with a subject line: &#8220;Subject: test mail&#8221;. After this the mail body could be issued: &#8220;this is a test&#8221;.<\/p>\n<p>The mail content was finished by a dot &#8220;.&#8221; on a line.<\/p>\n<p>After this, the mail was queued for delivery. This was indicated by a response from the mail server: &#8220;250 Mail queued for delivery.&#8221;. After that I gave &#8220;quit&#8221; upon which the actual mail was sent.<\/p>\n<p>What is the benefit of this exercise? At least, it shows me a way to send Emails from the command line. This could also be used to write a program that could send Emails automatically. Such a program should be able to send output to the command line. If similar lines like above would be send, an Email would be sent. This could then be used as a warning mechanism.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am subscribed to a ADSL provider who also provides Email services. Hence, I could try to send some mail from the command line on my laptop. As a first step, I started a telnet session with the provider: from the command line I gave the command: &#8220;telnet\u00a0mail.wxs.nl 25&#8221;. The server responded promptly. As response [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-nice-to-know"],"_links":{"self":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16"}],"version-history":[{"count":0,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/16\/revisions"}],"wp:attachment":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}