{"id":570,"date":"2018-04-15T11:45:37","date_gmt":"2018-04-15T10:45:37","guid":{"rendered":"https:\/\/www.kolkataonweb.com\/code-bank\/?p=570"},"modified":"2018-04-15T12:24:39","modified_gmt":"2018-04-15T11:24:39","slug":"testing-mail-from-commandline","status":"publish","type":"post","link":"https:\/\/www.kolkataonweb.com\/code-bank\/miscellaneous\/testing-mail-from-commandline\/","title":{"rendered":"Testing mail from commandline"},"content":{"rendered":"<pre class='wp-code-highlight prettyprint'>echo \"This is the main body of the mail\" | mail -s \"Subject of the Email\" -a \"From: test@iot-parts.com\" manish.kolikata@gmail.com<\/pre>\n<hr \/>\n<pre class='wp-code-highlight prettyprint'>telnet iot-parts.com 25\r\nmailMAIL FROM:root@iot-parts.com\r\nRCPT TO:manish.kolikata@gmail.com\r\nDATA<\/pre>\n<pre class='wp-code-highlight prettyprint'>telnet localhost 143\r\na login \"username\" \"password\"\r\n\r\n     Test using imaps port (assuming you haven't disabled imaps port):\r\n     # openssl s_client -connect imap.example.com:993\r\n\r\n     Test using imap port and STARTTLS command (works also with imap port):\r\n     # openssl s_client -connect imap.example.com:143 -starttls imap\r\n\r\nb select inbox\r\nc list \"\" *\r\ne logout<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>echo &#8220;This is the main body of the mail&#8221; | mail -s &#8220;Subject of the Email&#8221; -a &#8220;From: test@iot-parts.com&#8221; manish.kolikata@gmail.com telnet iot-parts.com 25 mailMAIL FROM:root@iot-parts.com RCPT TO:manish.kolikata@gmail.com DATA telnet localhost 143 a login &#8220;username&#8221; &#8220;password&#8221; Test using imaps port (assuming you haven&#8217;t disabled imaps port): # openssl s_client -connect imap.example.com:993 Test using imap port and&hellip; <a class=\"more-link\" href=\"https:\/\/www.kolkataonweb.com\/code-bank\/miscellaneous\/testing-mail-from-commandline\/\">Continue reading <span class=\"screen-reader-text\">Testing mail from commandline<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[118,119],"class_list":["post-570","post","type-post","status-publish","format-standard","hentry","category-miscellaneous","tag-email-testing","tag-email-testing-commands","entry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/comments?post=570"}],"version-history":[{"count":3,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/570\/revisions"}],"predecessor-version":[{"id":575,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/570\/revisions\/575"}],"wp:attachment":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/media?parent=570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/categories?post=570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/tags?post=570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}