{"id":2435,"date":"2017-12-08T10:30:29","date_gmt":"2017-12-08T10:30:29","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2435"},"modified":"2025-02-01T23:08:07","modified_gmt":"2025-02-01T23:08:07","slug":"send-an-html-email-using-perl-and-sendmail","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/send-an-html-email-using-perl-and-sendmail\/","title":{"rendered":"Send an HTML email using perl and sendmail"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: Send an HTML email using perl and sendmail<\/strong><\/p>\n<p>Send an HTML email using perl and sendmail<\/p>\n<p><code>open(MAIL,\"|\/usr\/sbin\/sendmail -t\");<\/p>\n<p>    ## Mail Header<br \/>\n    print MAIL \"To: rajeshk\\@xxx.com\\n\";<br \/>\n    print MAIL \"From: rajeshk\\@xxxx.com\\n\";<br \/>\n    print MAIL \"Subject: TEST\\n\";<br \/>\n    ## Mail Body<br \/>\n    print MAIL \"Content-Type: text\/html; charset=ISO-8859-1\\n\"<br \/>\n        . \"<html><head><\/head><body>@emailBody<\/body>\";<br \/>\n close(MAIL)<\/code><\/p>\n<p>Regards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: Send an HTML email using perl and sendmail Send an HTML email using perl and sendmail open(MAIL,&#8221;|\/usr\/sbin\/sendmail -t&#8221;); ## Mail Header print MAIL &#8220;To: rajeshk\\@xxx.com\\n&#8221;; print&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[14],"tags":[175],"class_list":["post-2435","post","type-post","status-publish","format-standard","hentry","category-perl","tag-perl"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2435"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2435\/revisions"}],"predecessor-version":[{"id":2436,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2435\/revisions\/2436"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}