<?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: mailx command in Linux in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/mailx-command-in-linux/m-p/7103722#M55258</link>
    <description>&lt;P&gt;try logging a ticket with hpe support team&lt;/P&gt;</description>
    <pubDate>Mon, 05 Oct 2020 07:16:57 GMT</pubDate>
    <dc:creator>avd437</dc:creator>
    <dc:date>2020-10-05T07:16:57Z</dc:date>
    <item>
      <title>mailx command in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/mailx-command-in-linux/m-p/7101916#M55257</link>
      <description>&lt;P&gt;Hi, Can anyone pls help me for below issue.&lt;/P&gt;&lt;P&gt;Below code is working fine in unix sever for sending mail along with attachments from an array variable i.e DISCARDED_FILE_NAME. But same code is not working in Linux sever, since -m in mail command will not be supported in linux instead of it we need to use -a. Even I have tried with it as shown below but still it is not working.&lt;/P&gt;&lt;P&gt;This code is working fine in Unix sever with out any issue:&lt;/P&gt;&lt;P&gt;MRP_NAME=$1&lt;BR /&gt;set -A DISCARDED_FILES $2&lt;BR /&gt;DISCARDED_FILE_NAME="DISCARDED"&lt;BR /&gt;echo "MRP_NAME" ${MRP_NAME}&lt;BR /&gt;RECEIVER="xyz@gmail.com"&lt;BR /&gt;echo "RECEIVER" ${RECEIVER}&lt;BR /&gt;SUBJECT="Error on ${MRP_NAME}"&lt;BR /&gt;BODY="Errore nell' elaborazione dell' ${MRP_NAME} Controllare file ${DISCARDED_FILE_NAME}"&lt;BR /&gt;echo "${BODY}"&lt;BR /&gt;(echo "$BODY\n";&lt;BR /&gt;for file in ${DISCARDED_FILES[@]}&lt;BR /&gt;do&lt;BR /&gt;uuencode $file `echo $file | cut -d'/' -f9`&lt;BR /&gt;done ) | mailx -m -s "${SUBJECT}" ${RECEIVER}&lt;BR /&gt;echo mail sent&lt;BR /&gt;&lt;BR /&gt;So I modified accordingly to work in linux sever but failed as shown below :&lt;/P&gt;&lt;P&gt;This code is not working in linux sever:&lt;BR /&gt;&lt;BR /&gt;MRP_NAME=$1&lt;BR /&gt;set -A DISCARDED_FILES $2&lt;BR /&gt;DISCARDED_FILE_NAME="DISCARDED"&lt;BR /&gt;echo "MRP_NAME" ${MRP_NAME}&lt;BR /&gt;RECEIVER="xyz@gmail.com"&lt;BR /&gt;echo "RECEIVER" ${RECEIVER}&lt;BR /&gt;SUBJECT="Error on ${MRP_NAME}"&lt;BR /&gt;BODY="Errore nell' elaborazione dell' ${MRP_NAME} Controllare file ${DISCARDED_FILE_NAME}"&lt;BR /&gt;echo "${BODY}"&lt;BR /&gt;(echo "$BODY\n";&lt;BR /&gt;for file in ${DISCARDED_FILES[@]}&lt;BR /&gt;do&lt;BR /&gt;uuencode $file `echo $file | cut -d'/' -f9`&lt;BR /&gt;DISCARDED_FILES+=( "-a" $file)&lt;BR /&gt;done ) | mailx "${DISCARDED_FILES[@]}" -s "${SUBJECT}" ${RECEIVER}&lt;BR /&gt;echo mail sent&lt;BR /&gt;&lt;BR /&gt;when I ran the above code in linux sever then iam getting below text in mail(body) without any attachments.&lt;BR /&gt;&lt;BR /&gt;Errore nell' elaborazione dell' Controllare file DISCARDED\n&lt;BR /&gt;begin 660 shell.txt&lt;BR /&gt;3=F%R=6X@:70@:7,@:6X@8F]D&amp;gt;0&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;end&lt;BR /&gt;begin 660 MoneticalBatchExtlogs.txt&lt;BR /&gt;M9&amp;amp;-T97)I;#`Q.B]A&amp;lt;'`O&amp;lt;W!E+TUO;F5T:6-A0F%T8VA%&amp;gt;'0O;&amp;amp;]G+T)312,@&lt;BR /&gt;M&amp;lt;V@@36]N971I8V%?3&amp;amp;]A9%]$871A7TU24#`Q+G-H"DU24%].04U%.B`M+2TM&lt;BR /&gt;M/B!-4E`P,0I-4E!?0TQ!4U-?3D%-13H@+2TM+3X@:70N&amp;lt;V5L;&amp;amp;$N;6]N971I&lt;BR /&gt;M8V%B871C:&amp;amp;5X="YA&amp;lt;'`N35)0,#%!&amp;lt;'`*0U123%]&amp;amp;24Q%3D%-13H@+2TM+3X@&lt;BR /&gt;M36]N971I8V%?3&amp;amp;]A9%]$871A7TU24#`Q+F-T;`I,3T=?1DE,13H@+2TM+3X@&lt;BR /&gt;M+V%P&amp;lt;"]S&amp;lt;&amp;amp;4O36]N971I8V%"871C:$5X="]L;V&amp;lt;O36]N971I8V%?3&amp;amp;]A9%]$&lt;BR /&gt;M871A7TU24#`Q7S$Q,#DR,#(P7S$U,#&amp;lt;Q-RYL;V&amp;lt;*6S$U.C`W.C$W72!-;VYE&lt;BR /&gt;M=&amp;amp;EC84)A=&amp;amp;-H17AT($U24#`Q('-C&amp;lt;FEP="!S=&amp;amp;%R="XN+@I;,34Z,#&amp;lt;Z,3==&lt;BR /&gt;M($UO;F5T:6-A0F%T8VA%&amp;gt;'0@35)0,#$@&amp;lt;V-R:7!T('-T87)T+BXN"ELQ-3HP&lt;BR /&gt;M-SHQ-UT@4W1A&amp;lt;G0@9V5N97)A=&amp;amp;EN9R!S97%U96YC92!F;W(@97AC97!T:6]N&lt;BR /&gt;M("XN+@I"051#2%]315%514Y#15])1"`](#(Q.#`X"ELQ-3HP-SHQ-UT@16YD&lt;BR /&gt;M(&amp;amp;=E;F5R871I;F&amp;lt;@&amp;lt;V5Q=65N8V4@9F]R(&amp;amp;5X8V5P=&amp;amp;EO;B`N+BX*6S$U.C`W&lt;BR /&gt;M.C$W72!3=&amp;amp;%R="!I;G-E&amp;lt;G1I;F&amp;lt;@8F%T8V@@9&amp;amp;5T86EL&amp;lt;RXN+@I;,34Z,#&amp;lt;Z&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Sep 2020 13:23:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/mailx-command-in-linux/m-p/7101916#M55257</guid>
      <dc:creator>Varun125</dc:creator>
      <dc:date>2020-09-20T13:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: mailx command in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/mailx-command-in-linux/m-p/7103722#M55258</link>
      <description>&lt;P&gt;try logging a ticket with hpe support team&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 07:16:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/mailx-command-in-linux/m-p/7103722#M55258</guid>
      <dc:creator>avd437</dc:creator>
      <dc:date>2020-10-05T07:16:57Z</dc:date>
    </item>
  </channel>
</rss>

