Mailx appending exclamation mark and newline in a long line

Hi,

I have a shell script which automates reporting and at times, requires the report line to be very long (sometimes as long as 2131 chars). The output I get is similar to this:

XXXX XXXXXXX 16:15  3.24%  5.07%  3.69%  5.23%  3.68%  4.06%  3.57%  5.03%  4.31%  5.11%  3.49%  4.19%  4.31%  4.78%  3.97%  4.85%  4.17%  4.95%  3.45%  4.55%  4.00%  4.95%  3.01%  4.63%  3.21%  4.83%  3.73%  4.57%  3.98%  4.62%  3.56%  4.84%  3.67%  5.33%  2.99%  5.54%  4.74%  4.65%  3.58%  4.83%  3.98%  4.50%  3.62%  5.43%  3.41%  5.32%  3.41%  3.56%  3.80%  4.75%  3.70%  4.94%  3.58%  5.19%  3.65%  4.16%  4.36%  4.98%  4.34%  4.50%  3.03%  4.98%  4.13%  4.67%  4.18%  4.91%  3.60%  4.54%  4.30%  4.91%  3.91%  4.75%  3.95%  5.43%  3.77%  5.47%  3.63%  4.18%  4.34%  4.37%  3.22%  5.64%  3.59%  5.45%  3.21%  4.74%  4.33%  4.46%  4.73%  4.87%  4.37%  4.94%  4.12%  4.15%  3.87%  4.67%  3.36%  5.39%  3.55%  4.70%  3.05%  4.56%  4.04%  5.46%  4.55%  4.92%  3.12%  4.68%  3.61%  5.09%  2.97%  4.28%  3.34%  4.86%  3.98%  4.71%  3.98%  5.68%  3.42%  4.96%  3.49%  4.30%  3.77%  5.13%  3.68%  4.60%  3.48%  4.42%  3.10%  4.64%  4.18%  6.03%  2.72%  5.25%  4.07%  4.77%  3.75%  4.37%  3.64!
 %  4.72%  3.48%  4.56%  3.28%  5.15%  3.71%  4.84%  3.05%  4.66%  3.15%  5.09%  3.54%  5.24%  3.76%  4.74%  3.35%  4.57%  4.35%  4.83%  3.53%  4.86%  3.14%  4.96%  3.56%  4.89%  2.95%  5.25%  3.58%  5.14%  3.14%  4.06%  3.23%  4.65%  3.12%  4.50%  4.20%  5.24%  4.02%  5.02%  4.34%  5.06%  3.33%  6.26%  3.42%  4.36%  3.22%  4.93%  3.80%  5.09%  3.49%  4.89%  2.74%  5.53%  4.18%  5.59%  3.77%  5.21%  3.68%  5.25%  3.19%  4.32%  2.96%  4.88%  4.23%  5.25%  3.38%  4.48%  3.47%  4.88%  4.59%  5.40%  3.23%  4.80%  3.11%  5.87%  3.24%  4.40%  4.17%  3.57%  3.75%  4.53%  3.51%  5.36%  3.61%  5.74%  3.64%  4.97%  3.66%  4.89%  3.79%  6.17%  4.06%  4.50%  3.66%  3.92%  3.25%  4.71%  3.24%  4.65%  3.22%  4.99%  3.13%  4.75%  4.00%  5.27%  3.81%  4.19%  3.54%  4.48%  4.03%  4.47%  3.73%  4.81%  3.26%  4.76%  3.33%  5.28%  3.25%  5.30%  3.52%  5.45%  3.28%  6.77%  3.34%  5.10%  3.24%  5.35%  3.22%  3.93%  3.71%  5.03%  3.96%  4.19%  3.87%  5.01%  3.50%  4.29%  3.67%  4.73%  3.96%  4.82%!
   3.81%  5.30%  2.92%  4.31%  3.53%  4.99%  4.15%  4.73%  3.50!
 %  5.32%
  3.58%  5.23%  4.10%  5.60%  3.21%  5.60%  3.61%  5.31%  3.69%  4.44%  3.73%  5.65%

This is the version of mailx being used:

$ mailx -V
12.4 7/29/08

Redhat Version

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)

This is the syntax used in the mailx command:

ssh <user>@<server> "cat <filename> | mailx -v -s '<subject>' -r 'no-reply@xxx.com' $emailList"

I have noticed that sending the email to a single person works perfectly fine, the line doesn't get wrapped. However, if the email list is extended to a mailing list, I get the output shown above. Any idea what could be the reason? Email is sent as plain text.

try:

ssh <user>@<server> "mailx -v -s '<subject>' -r 'no-reply@xxx.com' $emailList < filename"

Same outcome.