When I use mailx or sendmail (on RHEL 6.9, Perl v5.10.1) from within perl such as
qx( qq\cat $log | mailx -r $EMAIL_ADMIN -s "Exchange Backup Status $rp
+tdate" $SEND_TO\ );
I receive the email in outlook with the following in the body of the message:
Message-ID: <5a27f1a0.VRRIyXDBT0l57yCy%xxx@yyy.com>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
If I run the command directly from the o/s, or have the perl code create a shell script with this command that then gets executed, this preamble does not appear.
Anyone know what may be going on here? I really don't want to use packages for such a simple operation.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|