<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Subject line with the sendmail command in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510536#M38480</link>
    <description>Hi Trilok:&lt;BR /&gt;&lt;BR /&gt;OK, this works:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;sendmail myemail@mycompany.com &amp;lt;&amp;lt;- EOF!&lt;BR /&gt;&amp;gt; Subject: Disk Report from $(hostname)&lt;BR /&gt;&amp;gt; $(&amp;lt; /tmp/diskreport)&lt;BR /&gt;&amp;gt; EOF!&lt;BR /&gt;&lt;BR /&gt;Again, make sure that the line that begins with "Subject" specifies an uppercase "S" and a colon (:) character as shown.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
    <pubDate>Thu, 08 Oct 2009 19:40:30 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2009-10-08T19:40:30Z</dc:date>
    <item>
      <title>Subject line with the sendmail command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510531#M38475</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I want to send a mail from command line, I am using sendmail command for the same. &lt;BR /&gt;&lt;BR /&gt;I tried sending mails to myself. I am able to send mails but, i don't know how to specify Subject line.&lt;BR /&gt;&lt;BR /&gt;echo "Disk Report of `hostname` as of `date`" 2&amp;gt; /dev/null &amp;gt; diskreport&lt;BR /&gt;df &amp;gt;&amp;gt; diskreport&lt;BR /&gt;sendmail  " trilok.prasad@gmail.com &amp;lt; diskreport&lt;BR /&gt;&lt;BR /&gt;How can Subject line be specified?&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;Trilok PVP</description>
      <pubDate>Thu, 08 Oct 2009 14:03:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510531#M38475</guid>
      <dc:creator>trilok_pvp</dc:creator>
      <dc:date>2009-10-08T14:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Subject line with the sendmail command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510532#M38476</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# mailx -s "Disk Report for $(hostname)" myemail@mycompany.com &amp;lt; diskreport&lt;BR /&gt;&lt;BR /&gt;Note the '-s' argument and the use of 'mailx'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 08 Oct 2009 16:11:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510532#M38476</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-10-08T16:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Subject line with the sendmail command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510533#M38477</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;The mailx is working in hp unix servers, same scripts with mailx -s is working in hp unix servers. mailx is not working in linux postfix relay pc. sendmail is working and i am getting the mail without subject.</description>
      <pubDate>Thu, 08 Oct 2009 16:14:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510533#M38477</guid>
      <dc:creator>trilok_pvp</dc:creator>
      <dc:date>2009-10-08T16:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Subject line with the sendmail command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510534#M38478</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Sendmail isn't intended at a user interface.  You can type, line-for-line something like:&lt;BR /&gt;&lt;BR /&gt;sendmail myemail@mycompany.com&lt;BR /&gt;Subject: myrepot&lt;BR /&gt;This is the body of my message&lt;BR /&gt;^D&lt;BR /&gt;&lt;BR /&gt;...Note the line that begins with "Subject:" triggers the subject line.  The ^D is a control_D which signifies end-of-file.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 08 Oct 2009 17:02:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510534#M38478</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-10-08T17:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Subject line with the sendmail command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510535#M38479</link>
      <description>Shalom Trilok,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hpux.ws/?p=6" target="_blank"&gt;http://www.hpux.ws/?p=6&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Take a look at the script in there. It is a bit more than you need but demonstrates how to control the subject.&lt;BR /&gt;&lt;BR /&gt;You can also use the script to attach a file to an email, delivering your report that way.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 08 Oct 2009 19:25:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510535#M38479</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-10-08T19:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Subject line with the sendmail command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510536#M38480</link>
      <description>Hi Trilok:&lt;BR /&gt;&lt;BR /&gt;OK, this works:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;sendmail myemail@mycompany.com &amp;lt;&amp;lt;- EOF!&lt;BR /&gt;&amp;gt; Subject: Disk Report from $(hostname)&lt;BR /&gt;&amp;gt; $(&amp;lt; /tmp/diskreport)&lt;BR /&gt;&amp;gt; EOF!&lt;BR /&gt;&lt;BR /&gt;Again, make sure that the line that begins with "Subject" specifies an uppercase "S" and a colon (:) character as shown.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Oct 2009 19:40:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510536#M38480</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-10-08T19:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Subject line with the sendmail command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510537#M38481</link>
      <description>&lt;!--!*#--&gt;For similar purposes I would use something like this (one line):&lt;BR /&gt;&lt;BR /&gt;/usr/bin/printf "%b" "Subject:subject goes here\nFrom:specify.from@address.com\n" $(cat diskreport) | /usr/sbin/sendmail your@mail.com&lt;BR /&gt;&lt;BR /&gt;The $(cat diskreport) will fill the message body. It is possible to substitute it with plain text or other command if required.</description>
      <pubDate>Fri, 09 Oct 2009 08:40:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510537#M38481</guid>
      <dc:creator>Modris Bremze</dc:creator>
      <dc:date>2009-10-09T08:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Subject line with the sendmail command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510538#M38482</link>
      <description>The "Subject:" is a header field in an RFC822 e-mail message; a blank line should separate the body of the message from the headers.&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Oct 2009 18:13:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510538#M38482</guid>
      <dc:creator>Stephen P. Schaefer</dc:creator>
      <dc:date>2009-10-09T18:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Subject line with the sendmail command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510539#M38483</link>
      <description>not sure what distro you are using, but if you like mailx you can install it. If this is rhel you can either &lt;BR /&gt;&lt;BR /&gt;up2date -i mailx&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;yum install mailx</description>
      <pubDate>Fri, 09 Oct 2009 18:21:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/subject-line-with-the-sendmail-command/m-p/4510539#M38483</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2009-10-09T18:21:55Z</dc:date>
    </item>
  </channel>
</rss>

